blob: 0ec23b874604b48d12cbcb192dba3ecd925c7c9c [file] [log] [blame]
/*
* Copyright (c) 2020 Eike Stepper (Loehne, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Eike Stepper - initial API and implementation
*/
package org.eclipse.net4j.util.ui;
import org.eclipse.net4j.util.factory.ProductCreationException;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.ui.IWorkbenchPage;
/**
* @author Eike Stepper
* @since 3.9
*/
public interface MenuFiller
{
public boolean fillMenu(IWorkbenchPage page, StructuredViewer viewer, IMenuManager menu, Object selectedElement);
/**
* @author Eike Stepper
*/
public static abstract class Factory extends org.eclipse.net4j.util.factory.Factory
{
public static final String PRODUCT_GROUP = "org.eclipse.net4j.util.ui.menuFillers";
public Factory(String type)
{
super(PRODUCT_GROUP, type);
}
@Override
public abstract MenuFiller create(String description) throws ProductCreationException;
}
}