| java.lang.Object org.eclipse.ui.internal.PopupMenuExtender
PopupMenuExtender | public class PopupMenuExtender implements IMenuListener2,IRegistryChangeListener(Code) | | This class extends a single popup menu
|
Method Summary | |
final public void | addMenuId(String menuId)
Adds another menu identifier to this extender. | public void | dispose() Dispose of the menu extender. | public MenuManager | getManager() | public Set | getMenuIds() Return the menu identifiers for this extender. | final public boolean | matches(MenuManager menuManager, ISelectionProvider selectionProvider, IWorkbenchPart part) Determines whether this extender would be the same as another extender
created with the given values. | final public void | menuAboutToHide(IMenuManager mgr) Notifies the listener that the menu is about to be hidden. | public void | menuAboutToShow(IMenuManager mgr) Notifies the listener that the menu is about to be shown. | public void | registryChanged(IRegistryChangeEvent event) |
PopupMenuExtender | public PopupMenuExtender(String id, MenuManager menu, ISelectionProvider prov, IWorkbenchPart part)(Code) | | Construct a new menu extender.
Parameters: id - the menu id Parameters: menu - the menu to extend Parameters: prov - the selection provider Parameters: part - the part to extend |
PopupMenuExtender | public PopupMenuExtender(String id, MenuManager menu, ISelectionProvider prov, IWorkbenchPart part, boolean includeEditorInput)(Code) | | Construct a new menu extender.
Parameters: id - the menu id Parameters: menu - the menu to extend Parameters: prov - the selection provider Parameters: part - the part to extend Parameters: includeEditorInput - Whether the editor input should be included when adding objectcontributions to this context menu. |
addMenuId | final public void addMenuId(String menuId)(Code) | |
Adds another menu identifier to this extender. An extender can represent
many menu identifiers. These identifiers should represent the same menu
manager, selection provider and part. Duplicate identifiers are
automatically ignored.
For example, it is necessary to filter out duplicate identifiers for
CompilationUnitEditor instances, as these define both
"#CompilationUnitEditorContext" and
"org.eclipse.jdt.ui.CompilationUnitEditor.EditorContext"
as menu identifier for the same pop-up menu. We don't want to contribute
duplicate items in this case.
Parameters: menuId - The menu identifier to add to this extender; should not benull . |
dispose | public void dispose()(Code) | | Dispose of the menu extender. Should only be called when the part
is disposed.
|
getManager | public MenuManager getManager()(Code) | | |
getMenuIds | public Set getMenuIds()(Code) | | Return the menu identifiers for this extender.
The set of all identifiers that represent this extender. |
matches | final public boolean matches(MenuManager menuManager, ISelectionProvider selectionProvider, IWorkbenchPart part)(Code) | | Determines whether this extender would be the same as another extender
created with the given values. Two extenders are equivalent if they have
the same menu manager, selection provider and part (i.e., if the menu
they represent is about to show, they would populate it with duplicate
values).
Parameters: menuManager - The menu manager with which to compare; may benull . Parameters: selectionProvider - The selection provider with which to compare; may benull . Parameters: part - The part with which to compare; may be null . true if the menu manager, selection provider andpart are all the same. |
menuAboutToHide | final public void menuAboutToHide(IMenuManager mgr)(Code) | | Notifies the listener that the menu is about to be hidden.
|
menuAboutToShow | public void menuAboutToShow(IMenuManager mgr)(Code) | | Notifies the listener that the menu is about to be shown.
|
registryChanged | public void registryChanged(IRegistryChangeEvent event)(Code) | | |
|
|