diff options
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/DiagramEditorContextMenuProvider.java')
-rw-r--r-- | plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/DiagramEditorContextMenuProvider.java | 122 |
1 files changed, 62 insertions, 60 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/DiagramEditorContextMenuProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/DiagramEditorContextMenuProvider.java index 6d35753789c..e4fba0d4eb9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/DiagramEditorContextMenuProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/DiagramEditorContextMenuProvider.java @@ -1,60 +1,62 @@ -/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.deployment.part;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gef.EditPartViewer;
-import org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.ContributionItemService;
-import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
-import org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * @generated
- */
-public class DiagramEditorContextMenuProvider extends DiagramContextMenuProvider {
-
- /**
- * @generated
- */
- private IWorkbenchPart part;
-
- /**
- * @generated
- */
- public DiagramEditorContextMenuProvider(IWorkbenchPart part, EditPartViewer viewer) {
- super(part, viewer);
- this.part = part;
- }
-
- /**
- * @generated
- */
- @Override
- public void buildContextMenu(final IMenuManager menu) {
- getViewer().flush();
- try {
- TransactionUtil.getEditingDomain((EObject) getViewer().getContents().getModel()).runExclusive(new Runnable() {
-
- @Override
- public void run() {
- ContributionItemService.getInstance().contributeToPopupMenu(DiagramEditorContextMenuProvider.this, part);
- menu.remove(ActionIds.ACTION_DELETE_FROM_MODEL);
- }
- });
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Error building context menu", e);
- }
- }
-}
+/** + * Copyright (c) 2014 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.diagram.deployment.part; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.util.TransactionUtil; +import org.eclipse.gef.EditPartViewer; +import org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.ContributionItemService; +import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds; +import org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.ui.IWorkbenchPart; + +/** + * @generated + */ +public class DiagramEditorContextMenuProvider extends DiagramContextMenuProvider { + + /** + * @generated + */ + private IWorkbenchPart part; + + /** + * @generated + */ + public DiagramEditorContextMenuProvider(IWorkbenchPart part, EditPartViewer viewer) { + super(part, viewer); + this.part = part; + } + + /** + * @generated + */ + @Override + public void buildContextMenu(final IMenuManager menu) { + getViewer().flush(); + try { + TransactionUtil.getEditingDomain( + (EObject) getViewer().getContents().getModel()).runExclusive(new Runnable() { + + @Override + public void run() { + ContributionItemService.getInstance().contributeToPopupMenu( + DiagramEditorContextMenuProvider.this, part); + menu.remove(ActionIds.ACTION_DELETE_FROM_MODEL); + } + }); + } catch (Exception e) { + UMLDiagramEditorPlugin.getInstance().logError("Error building context menu", e); + } + } +} |