public interface IMenuManager extends IContributionManager, IContributionItem
IMenuManager interface provides protocol for managing
contributions to a menu bar and its sub menus.
An IMenuManager is also an IContributionItem,
allowing sub-menus to be nested in parent menus.
This interface is internal to the framework; it should not be implemented outside the framework.
This package provides a concrete menu manager implementation,
.
MenuManager
| Modifier and Type | Method and Description |
|---|---|
void |
addMenuListener(IMenuListener listener)
Adds a menu listener to this menu.
|
IMenuManager |
findMenuUsingPath(String path)
Finds the manager for the menu at the given path.
|
IContributionItem |
findUsingPath(String path)
Finds the contribution item at the given path.
|
boolean |
getRemoveAllWhenShown()
Returns whether all items should be removed when the menu is about to
show, but before notifying menu listeners.
|
boolean |
isEnabled()
Returns whether this menu should be enabled or not.
|
void |
removeMenuListener(IMenuListener listener)
Removes the given menu listener from this menu.
|
void |
setRemoveAllWhenShown(boolean removeAll)
Sets whether all items should be removed when the menu is about to show,
but before notifying menu listeners.
|
void |
updateAll(boolean force)
Incrementally builds the menu from the contribution items, and
does so recursively for all submenus.
|
add, add, appendToGroup, appendToGroup, find, getItems, getOverrides, insertAfter, insertAfter, insertBefore, insertBefore, isDirty, isEmpty, markDirty, prependToGroup, prependToGroup, remove, remove, removeAll, updatedispose, fill, fill, fill, fill, getId, isDirty, isDynamic, isGroupMarker, isSeparator, isVisible, saveWidgetState, setParent, setVisible, update, updatevoid addMenuListener(IMenuListener listener)
listener - a menu listenerIMenuManager findMenuUsingPath(String path)
'/'.
Convenience for findUsingPath(path) which
extracts an IMenuManager if possible.
path - the path stringnull
if there is no such contribution item or if the item does
not have an associated menu managerIContributionItem findUsingPath(String path)
'/'.path - the path stringnull if there is no
such contribution itemboolean getRemoveAllWhenShown()
false.true if all items should be removed when shown,
false if notboolean isEnabled()
isEnabled in interface IContributionItemtrue if enabled, and
false if disabledvoid removeMenuListener(IMenuListener listener)
listener - the menu listenervoid setRemoveAllWhenShown(boolean removeAll)
removeAll - true if all items should be removed when shown,
false if notvoid updateAll(boolean force)
force - true means update even if not dirty,
and false for normal incremental updatingGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.