|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.action.ContributionManager
org.eclipse.jface.action.MenuManager
org.eclipse.gef.ContextMenuProvider
roneditor.editor.ContextMenuProviderWithActionRegistry
public abstract class ContextMenuProviderWithActionRegistry
This ContextMenuProvider gets an ActionRegistry
in its constructor
which is used to resolve actions via some key, usually their IDs. Some
methods are provided to append (dynamically) an action several standard GEF
action groups.
Field Summary | |
---|---|
private org.eclipse.gef.ui.actions.ActionRegistry |
actionRegistry
The ActionRegistry used to resolve the actions. |
Constructor Summary | |
---|---|
ContextMenuProviderWithActionRegistry(org.eclipse.gef.EditPartViewer viewer,
org.eclipse.gef.ui.actions.ActionRegistry actionRegistry)
The constructor for this class. |
Method Summary | |
---|---|
protected void |
appendActionToGroup(org.eclipse.jface.action.IMenuManager menu,
java.lang.String actionId,
java.lang.String group)
Appends the specified action to the specified group. |
protected void |
dynamicAppendActionToGroup(org.eclipse.jface.action.IMenuManager menu,
java.lang.String actionId,
java.lang.String group)
Appends the specified action to the menu edit group if the action is enabled. |
Methods inherited from class org.eclipse.gef.ContextMenuProvider |
---|
buildContextMenu, getViewer, menuAboutToShow, setViewer |
Methods inherited from class org.eclipse.jface.action.MenuManager |
---|
addMenuListener, createContextMenu, createMenuBar, createMenuBar, dispose, fill, fill, fill, fill, findMenuUsingPath, findUsingPath, getId, getMenu, getMenuText, getOverrides, getParent, getRemoveAllWhenShown, isDynamic, isEnabled, isGroupMarker, isSeparator, isSubstituteFor, isVisible, markDirty, removeMenuListener, saveWidgetState, setOverrides, setParent, setRemoveAllWhenShown, setVisible, update, update, update, update, updateAll |
Methods inherited from class org.eclipse.jface.action.ContributionManager |
---|
add, add, allowItem, appendToGroup, appendToGroup, dumpStatistics, find, getItems, hasDynamicItems, indexOf, indexOf, insert, insertAfter, insertAfter, insertBefore, insertBefore, internalSetItems, isDirty, isEmpty, itemAdded, itemRemoved, prependToGroup, prependToGroup, remove, remove, removeAll, replaceItem, setDirty |
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.IContributionManager |
---|
add, add, appendToGroup, appendToGroup, find, getItems, insertAfter, insertAfter, insertBefore, insertBefore, isDirty, isEmpty, prependToGroup, prependToGroup, remove, remove, removeAll |
Methods inherited from interface org.eclipse.jface.action.IContributionItem |
---|
isDirty |
Field Detail |
---|
private org.eclipse.gef.ui.actions.ActionRegistry actionRegistry
ActionRegistry
used to resolve the actions.
Constructor Detail |
---|
public ContextMenuProviderWithActionRegistry(org.eclipse.gef.EditPartViewer viewer, org.eclipse.gef.ui.actions.ActionRegistry actionRegistry)
viewer
- The viewer in which the context menu is used.actionRegistry
- An action registry hosting the actions to show in the context
menu.Method Detail |
---|
protected void appendActionToGroup(org.eclipse.jface.action.IMenuManager menu, java.lang.String actionId, java.lang.String group)
menu
- The MenuManager to be used.actionId
- The id of the action to be put in the context menu.group
- The group to put in the action.protected void dynamicAppendActionToGroup(org.eclipse.jface.action.IMenuManager menu, java.lang.String actionId, java.lang.String group)
menu
- The MenuManager to be used.actionId
- The id of the action to be put in the context menu.group
- The group to put in the action.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |