Package org.eclipse.ui.internal
Class EditorMenuManager
java.lang.Object
org.eclipse.jface.action.SubContributionManager
org.eclipse.jface.action.SubMenuManager
org.eclipse.ui.internal.EditorMenuManager
- All Implemented Interfaces:
IContributionItem
,IContributionManager
,IMenuManager
An
EditorMenuManager
is used to sort the contributions made by
an editor so that they always appear after the action sets.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendToGroup
(String groupName, IContributionItem item) Adds a contribution item to this manager at the end of the group with the given name.protected IAction[]
protected void
protected void
getAllContributedActions
(HashSet<IAction> set, IContributionItem item) getItems()
Returns all contribution items known to this manager.Returns the overrides for the items of this manager.void
prependToGroup
(String groupName, IContributionItem item) Adds a contribution item to this manager at the beginning of the group with the given name.void
setEnabledAllowed
(boolean enabledAllowed) Sets the enablement ability of all the items contributed by the editor.void
setVisible
(boolean visible, boolean forceVisibility) Sets the visibility of the manager.protected SubMenuManager
wrapMenu
(IMenuManager menu) Wraps a menu manager in a sub menu manager, and returns the new wrapper.Methods inherited from class org.eclipse.jface.action.SubMenuManager
addMenuListener, dispose, disposeManager, fill, fill, fill, fill, find, findMenuUsingPath, findUsingPath, getId, getParentMenuManager, getRemoveAllWhenShown, getWrapper, isDynamic, isEnabled, isGroupMarker, isSeparator, removeAll, removeMenuListener, saveWidgetState, setParent, setRemoveAllWhenShown, setVisible, update, update, update, updateAll
Methods inherited from class org.eclipse.jface.action.SubContributionManager
add, add, appendToGroup, getParent, insertAfter, insertAfter, insertBefore, insertBefore, isDirty, isEmpty, isVisible, itemAdded, itemRemoved, items, markDirty, prependToGroup, remove, remove, unwrap, wrap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jface.action.IContributionItem
isDirty, isVisible
Methods inherited from interface org.eclipse.jface.action.IContributionManager
add, add, appendToGroup, insertAfter, insertAfter, insertBefore, insertBefore, isDirty, isEmpty, markDirty, prependToGroup, remove, remove
-
Constructor Details
-
EditorMenuManager
Constructs a new editor manager.
-
-
Method Details
-
getItems
Description copied from interface:IContributionManager
Returns all contribution items known to this manager.- Specified by:
getItems
in interfaceIContributionManager
- Overrides:
getItems
in classSubContributionManager
- Returns:
- a list of contribution items
-
getOverrides
Description copied from interface:IContributionManager
Returns the overrides for the items of this manager.- Specified by:
getOverrides
in interfaceIContributionManager
- Overrides:
getOverrides
in classSubContributionManager
- Returns:
- the overrides for the items of this manager
-
prependToGroup
Description copied from interface:IContributionManager
Adds a contribution item to this manager at the beginning of the group with the given name.- Specified by:
prependToGroup
in interfaceIContributionManager
- Overrides:
prependToGroup
in classSubContributionManager
- Parameters:
groupName
- the name of the groupitem
- the contribution item
-
appendToGroup
Description copied from interface:IContributionManager
Adds a contribution item to this manager at the end of the group with the given name.- Specified by:
appendToGroup
in interfaceIContributionManager
- Overrides:
appendToGroup
in classSubContributionManager
- Parameters:
groupName
- the name of the groupitem
- the contribution item
-
setVisible
public void setVisible(boolean visible, boolean forceVisibility) Sets the visibility of the manager. If the visibility istrue
then each item within the manager appears within the parent manager. Otherwise, the items are not visible.If force visibility is
true
, or grayed out if force visibility isfalse
This is a workaround for the layout flashing when editors contribute large amounts of items.
- Parameters:
visible
- the new visibilityforceVisibility
- whether to change the visibility or just the enablement state.
-
setEnabledAllowed
public void setEnabledAllowed(boolean enabledAllowed) Sets the enablement ability of all the items contributed by the editor.- Parameters:
enabledAllowed
-true
if the items may enable- Since:
- 2.0
-
wrapMenu
Description copied from class:SubMenuManager
Wraps a menu manager in a sub menu manager, and returns the new wrapper.- Overrides:
wrapMenu
in classSubMenuManager
- Parameters:
menu
- the menu manager to wrap- Returns:
- the new wrapped menu manager
-
getAllContributedActions
-
getAllContributedActions
-
getAllContributedActions
-