|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectContextMenuProvider
org.eclipse.graphiti.ui.editor.DiagramEditorContextMenuProvider
public class DiagramEditorContextMenuProvider
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 | |
|---|---|
private ActionRegistry |
actionRegistry
|
private IConfigurationProvider |
configurationProvider
|
| Constructor Summary | |
|---|---|
DiagramEditorContextMenuProvider(EditPartViewer viewer,
ActionRegistry registry,
IConfigurationProvider configurationProvider)
Creates a new DiagramEditorContextMenuProvider. |
|
| Method Summary | |
|---|---|
protected void |
addActionToMenu(IMenuManager manager,
String actionId,
String menuGroup)
Adds the action to menu. |
protected void |
addActionToMenuIfAvailable(IMenuManager manager,
String actionId,
String menuGroup)
Adds the action to menu if available. |
protected void |
addAlignmentSubMenu(IMenuManager manager,
String group)
Adds the alignment sub menu. |
protected void |
addDefaultMenuGroupEdit(IMenuManager manager)
Adds the default menu group edit. |
protected void |
addDefaultMenuGroupPrint(IMenuManager manager)
Adds the default menu group print. |
protected void |
addDefaultMenuGroupRest(IMenuManager manager)
Adds the default menu group rest. |
protected void |
addDefaultMenuGroupSave(IMenuManager manager)
Adds the default menu group save. |
protected void |
addDefaultMenuGroupUndo(IMenuManager manager)
Adds the default menu group undo. |
private void |
addEntries(IMenuManager manager,
IContextMenuEntry[] contextMenuEntries,
ICustomContext context,
String groupID,
String textParentEntry)
|
protected boolean |
allowItem(IContributionItem itemToAdd)
|
private void |
appendContributionItem(IMenuManager manager,
String groupID,
IContributionItem contributionItem)
|
void |
buildContextMenu(IMenuManager manager)
Adds the Actions to the given IMenuManager, which is displayed as a context-menu. |
private void |
extendCustomContext(PictogramElement pe,
CustomContext context)
|
private DiagramBehavior |
getEditor()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final ActionRegistry actionRegistry
private final IConfigurationProvider configurationProvider
| Constructor Detail |
|---|
public DiagramEditorContextMenuProvider(EditPartViewer viewer,
ActionRegistry registry,
IConfigurationProvider configurationProvider)
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| Method Detail |
|---|
public void buildContextMenu(IMenuManager manager)
manager - the managerContextMenuProvider#buildContextMenu(IMenuManager)protected void addDefaultMenuGroupUndo(IMenuManager manager)
manager - the managerprotected void addDefaultMenuGroupSave(IMenuManager manager)
manager - the managerprotected void addDefaultMenuGroupEdit(IMenuManager manager)
manager - the managerprotected void addDefaultMenuGroupPrint(IMenuManager manager)
manager - the managerprotected void addDefaultMenuGroupRest(IMenuManager manager)
manager - the manager
private void addEntries(IMenuManager manager,
IContextMenuEntry[] contextMenuEntries,
ICustomContext context,
String groupID,
String textParentEntry)
private void appendContributionItem(IMenuManager manager,
String groupID,
IContributionItem contributionItem)
private void extendCustomContext(PictogramElement pe,
CustomContext context)
protected void addAlignmentSubMenu(IMenuManager manager,
String group)
manager - the managergroup - the group
protected void addActionToMenu(IMenuManager manager,
String actionId,
String menuGroup)
manager - the manageractionId - the action idmenuGroup - the menu group
protected void addActionToMenuIfAvailable(IMenuManager manager,
String actionId,
String menuGroup)
manager - the manageractionId - the action idmenuGroup - the menu groupprotected boolean allowItem(IContributionItem itemToAdd)
private DiagramBehavior getEditor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||