org.eclipse.graphiti.ui.editor

## Class DiagramEditorContextMenuProvider

- java.lang.Object
- - org.eclipse.jface.action.ContributionManager
  - - org.eclipse.jface.action.MenuManager
    - - org.eclipse.gef.ContextMenuProvider
      - - org.eclipse.graphiti.ui.editor.DiagramEditorContextMenuProvider

All Implemented Interfaces:
  org.eclipse.jface.action.IContributionItem, org.eclipse.jface.action.IContributionManager, org.eclipse.jface.action.IMenuListener, org.eclipse.jface.action.IMenuManager

    public class DiagramEditorContextMenuProvider
    extends org.eclipse.gef.ContextMenuProvider

Provides a standard-context-menu and adds it to the given EditPartViewer. Another feature is, that it can set the menu-location to all Actions.

Some of the standard-menu-items are: undo/redo, delete, copy/paste, alignment, zooming.

### Field Summary

### Fields inherited from class org.eclipse.jface.action.MenuManager

`MANAGER_KEY`

### Constructor Summary

Constructors
Constructor and Description
`DiagramEditorContextMenuProvider(org.eclipse.gef.EditPartViewer viewer, org.eclipse.gef.ui.actions.ActionRegistry registry, IConfigurationProvider configurationProvider)` Creates a new DiagramEditorContextMenuProvider.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `buildContextMenu(org.eclipse.jface.action.IMenuManager manager)` Adds the Actions to the given IMenuManager, which is displayed as a context-menu.

### Methods inherited from class org.eclipse.gef.ContextMenuProvider

`menuAboutToShow`

### Methods inherited from class org.eclipse.jface.action.MenuManager

`addMenuListener, createContextMenu, createMenuBar, createMenuBar, dispose, fill, fill, fill, fill, findMenuUsingPath, findUsingPath, getId, getImageDescriptor, getMenu, getMenuText, getOverrides, getParent, getRemoveAllWhenShown, isDynamic, isEnabled, isGroupMarker, isSeparator, isSubstituteFor, isVisible, markDirty, removeMenuListener, saveWidgetState, setActionDefinitionId, setImageDescriptor, setMenuText, setOverrides, setParent, setRemoveAllWhenShown, setVisible, toString, update, update, update, updateAll`

### Methods inherited from class org.eclipse.jface.action.ContributionManager

`add, add, appendToGroup, appendToGroup, find, getItems, getSize, indexOf, insert, insertAfter, insertAfter, insertBefore, insertBefore, isDirty, isEmpty, prependToGroup, prependToGroup, remove, remove, removeAll, replaceItem`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, 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`

### Constructor Detail

#### DiagramEditorContextMenuProvider

    public DiagramEditorContextMenuProvider(org.eclipse.gef.EditPartViewer viewer,
                                            org.eclipse.gef.ui.actions.ActionRegistry registry,
                                            IConfigurationProvider configurationProvider)

Creates a new DiagramEditorContextMenuProvider.

Parameters:
  `viewer` - The EditPartViewer, for which the context-menu shall be displayed.
  `registry` - The action-registry, which contains the actions corresponding to the menu-items.
  `configurationProvider` - the configuration provider
Since:
  0.10

### Method Detail

#### buildContextMenu

    public void buildContextMenu(org.eclipse.jface.action.IMenuManager manager)

Adds the Actions to the given IMenuManager, which is displayed as a context-menu.

Specified by:
  `buildContextMenu` in class `org.eclipse.gef.ContextMenuProvider`
Parameters:
  `manager` - the manager
See Also:
  `ContextMenuProvider.buildContextMenu(IMenuManager)`