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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendToGroup(String groupName, IContributionItem item) Adds a contribution item to this manager at the end of the group with the given name.protected IAction[]protected voidprotected voidgetAllContributedActions(HashSet<IAction> set, IContributionItem item) getItems()Returns all contribution items known to this manager.Returns the overrides for the items of this manager.voidprependToGroup(String groupName, IContributionItem item) Adds a contribution item to this manager at the beginning of the group with the given name.voidsetEnabledAllowed(boolean enabledAllowed) Sets the enablement ability of all the items contributed by the editor.voidsetVisible(boolean visible, boolean forceVisibility) Sets the visibility of the manager.protected SubMenuManagerwrapMenu(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, updateAllMethods 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, wrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.jface.action.IContributionItem
isDirty, isVisibleMethods 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:IContributionManagerReturns all contribution items known to this manager.- Specified by:
getItemsin interfaceIContributionManager- Overrides:
getItemsin classSubContributionManager- Returns:
- a list of contribution items
-
getOverrides
Description copied from interface:IContributionManagerReturns the overrides for the items of this manager.- Specified by:
getOverridesin interfaceIContributionManager- Overrides:
getOverridesin classSubContributionManager- Returns:
- the overrides for the items of this manager
-
prependToGroup
Description copied from interface:IContributionManagerAdds a contribution item to this manager at the beginning of the group with the given name.- Specified by:
prependToGroupin interfaceIContributionManager- Overrides:
prependToGroupin classSubContributionManager- Parameters:
groupName- the name of the groupitem- the contribution item
-
appendToGroup
Description copied from interface:IContributionManagerAdds a contribution item to this manager at the end of the group with the given name.- Specified by:
appendToGroupin interfaceIContributionManager- Overrides:
appendToGroupin 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 istruethen 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 isfalseThis 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-trueif the items may enable- Since:
- 2.0
-
wrapMenu
Description copied from class:SubMenuManagerWraps a menu manager in a sub menu manager, and returns the new wrapper.- Overrides:
wrapMenuin classSubMenuManager- Parameters:
menu- the menu manager to wrap- Returns:
- the new wrapped menu manager
-
getAllContributedActions
-
getAllContributedActions
-
getAllContributedActions
-