Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/AtsWorkflowConfigEditorContextMenuProvider.java')
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/AtsWorkflowConfigEditorContextMenuProvider.java120
1 files changed, 60 insertions, 60 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/AtsWorkflowConfigEditorContextMenuProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/AtsWorkflowConfigEditorContextMenuProvider.java
index 5c7bcf1426d..dbf997ccf61 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/AtsWorkflowConfigEditorContextMenuProvider.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/AtsWorkflowConfigEditorContextMenuProvider.java
@@ -8,63 +8,63 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.workflow.editor;
-
-import org.eclipse.gef.ContextMenuProvider;
-import org.eclipse.gef.EditPartViewer;
-import org.eclipse.gef.ui.actions.ActionRegistry;
-import org.eclipse.gef.ui.actions.GEFActionConstants;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.osee.ats.workflow.editor.actions.EditAction;
-import org.eclipse.osee.framework.core.exception.OseeArgumentException;
-import org.eclipse.ui.actions.ActionFactory;
-
-/**
- * Provides context menu actions for the ShapesEditor.
- *
- * @author Donald G. Dunne
- */
-class AtsWorkflowConfigEditorContextMenuProvider extends ContextMenuProvider {
-
- /** The editor's action registry. */
- private final ActionRegistry actionRegistry;
-
- /**
- * Instantiate a new menu context provider for the specified EditPartViewer and ActionRegistry.
- *
- * @param viewer the editor's graphical viewer
- * @param registry the editor's action registry
- * @throws OseeArgumentException if registry is <tt>null</tt>.
- */
- public AtsWorkflowConfigEditorContextMenuProvider(EditPartViewer viewer, ActionRegistry registry) {
- super(viewer);
- if (registry == null) {
- throw new IllegalArgumentException();
- }
- actionRegistry = registry;
- }
-
- /**
- * Called when the context menu is about to show. Actions, whose state is enabled, will appear in the context menu.
- *
- * @see org.eclipse.gef.ContextMenuProvider#buildContextMenu(org.eclipse.jface.action.IMenuManager)
- */
- @Override
- public void buildContextMenu(IMenuManager menu) {
- // Add standard action groups to the menu
- GEFActionConstants.addStandardActionGroups(menu);
-
- // Add actions to the menu
- menu.appendToGroup(GEFActionConstants.GROUP_EDIT, getAction(EditAction.ID));
- menu.appendToGroup(GEFActionConstants.GROUP_UNDO, // target group id
- getAction(ActionFactory.UNDO.getId())); // action to add
- menu.appendToGroup(GEFActionConstants.GROUP_UNDO, getAction(ActionFactory.REDO.getId()));
- menu.appendToGroup(GEFActionConstants.GROUP_EDIT, getAction(ActionFactory.DELETE.getId()));
- }
-
- private IAction getAction(String actionId) {
- return actionRegistry.getAction(actionId);
- }
-
-}
+package org.eclipse.osee.ats.workflow.editor;
+
+import org.eclipse.gef.ContextMenuProvider;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.ui.actions.ActionRegistry;
+import org.eclipse.gef.ui.actions.GEFActionConstants;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.osee.ats.workflow.editor.actions.EditAction;
+import org.eclipse.osee.framework.core.exception.OseeArgumentException;
+import org.eclipse.ui.actions.ActionFactory;
+
+/**
+ * Provides context menu actions for the ShapesEditor.
+ *
+ * @author Donald G. Dunne
+ */
+class AtsWorkflowConfigEditorContextMenuProvider extends ContextMenuProvider {
+
+ /** The editor's action registry. */
+ private final ActionRegistry actionRegistry;
+
+ /**
+ * Instantiate a new menu context provider for the specified EditPartViewer and ActionRegistry.
+ *
+ * @param viewer the editor's graphical viewer
+ * @param registry the editor's action registry
+ * @throws OseeArgumentException if registry is <tt>null</tt>.
+ */
+ public AtsWorkflowConfigEditorContextMenuProvider(EditPartViewer viewer, ActionRegistry registry) {
+ super(viewer);
+ if (registry == null) {
+ throw new IllegalArgumentException();
+ }
+ actionRegistry = registry;
+ }
+
+ /**
+ * Called when the context menu is about to show. Actions, whose state is enabled, will appear in the context menu.
+ *
+ * @see org.eclipse.gef.ContextMenuProvider#buildContextMenu(org.eclipse.jface.action.IMenuManager)
+ */
+ @Override
+ public void buildContextMenu(IMenuManager menu) {
+ // Add standard action groups to the menu
+ GEFActionConstants.addStandardActionGroups(menu);
+
+ // Add actions to the menu
+ menu.appendToGroup(GEFActionConstants.GROUP_EDIT, getAction(EditAction.ID));
+ menu.appendToGroup(GEFActionConstants.GROUP_UNDO, // target group id
+ getAction(ActionFactory.UNDO.getId())); // action to add
+ menu.appendToGroup(GEFActionConstants.GROUP_UNDO, getAction(ActionFactory.REDO.getId()));
+ menu.appendToGroup(GEFActionConstants.GROUP_EDIT, getAction(ActionFactory.DELETE.getId()));
+ }
+
+ private IAction getAction(String actionId) {
+ return actionRegistry.getAction(actionId);
+ }
+
+}

Back to the top