|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.action.ContributionManager | +--org.eclipse.jface.action.MenuManager | +--org.eclipse.gef.ContextMenuProvider
Extends MenuManager to allow populating the menu directly from the manager itself.
Using this class is no different than using a standalone MenuManager
, and
adding a menuAboutToShow listener.
Constructor Summary | |
ContextMenuProvider(EditPartViewer viewer)
Constructs a context menu for the specified EditPartViewer. |
Method Summary | |
abstract void |
buildContextMenu(IMenuManager menu)
Called when the menu is about to show. |
protected EditPartViewer |
getViewer()
Returns the EditPartViewer |
void |
menuAboutToShow(IMenuManager menu)
|
protected void |
setViewer(EditPartViewer viewer)
Sets the editpart viewer. |
Methods inherited from class org.eclipse.jface.action.MenuManager |
addMenuListener, createContextMenu, createMenuBar, createMenuBar, dispose, fill, fill, fill, findMenuUsingPath, findUsingPath, getId, getMenu, getMenuText, getOverrides, getParent, getRemoveAllWhenShown, isDynamic, isEnabled, isGroupMarker, isSeparator, isSubstituteFor, isVisible, removeMenuListener, setOverrides, setParent, setRemoveAllWhenShown, setVisible, update, update, update, update, updateAll |
Methods inherited from class org.eclipse.jface.action.ContributionManager |
add, add, appendToGroup, appendToGroup, dumpStatistics, find, getItems, hasDynamicItems, indexOf, insert, insertAfter, insertAfter, insertBefore, insertBefore, isDirty, isEmpty, itemAdded, itemRemoved, markDirty, prependToGroup, prependToGroup, remove, remove, removeAll, 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, markDirty, prependToGroup, prependToGroup, remove, remove, removeAll |
Methods inherited from interface org.eclipse.jface.action.IContributionItem |
isDirty |
Constructor Detail |
public ContextMenuProvider(EditPartViewer viewer)
viewer
- the editpart viewerMethod Detail |
public abstract void buildContextMenu(IMenuManager menu)
menu
- this parameter is actually this
objectprotected EditPartViewer getViewer()
public void menuAboutToShow(IMenuManager menu)
menuAboutToShow
in interface IMenuListener
IMenuListener.menuAboutToShow(IMenuManager)
protected void setViewer(EditPartViewer viewer)
viewer
- the viewer
|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |