diff options
Diffstat (limited to 'deprecated/org.eclipse.papyrus.navigator/src/org/eclipse/papyrus/navigator/actions/OpenDiagramAction.java')
-rw-r--r-- | deprecated/org.eclipse.papyrus.navigator/src/org/eclipse/papyrus/navigator/actions/OpenDiagramAction.java | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/deprecated/org.eclipse.papyrus.navigator/src/org/eclipse/papyrus/navigator/actions/OpenDiagramAction.java b/deprecated/org.eclipse.papyrus.navigator/src/org/eclipse/papyrus/navigator/actions/OpenDiagramAction.java deleted file mode 100644 index 950f08f4739..00000000000 --- a/deprecated/org.eclipse.papyrus.navigator/src/org/eclipse/papyrus/navigator/actions/OpenDiagramAction.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * - */ - -package org.eclipse.papyrus.navigator.actions; - -import org.eclipse.gmf.runtime.notation.Diagram; -import org.eclipse.jface.action.Action; -import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageMngr; -import org.eclipse.ui.ISharedImages; -import org.eclipse.ui.PlatformUI; - -/** - * Action used to open the given diagram. The diagram is open in a new tab, even if it is already - * open. - * - * @author cedric dumoulin - */ -public class OpenDiagramAction extends Action { - - private final Diagram diagram; - - private final IPageMngr pageMngr; - - public OpenDiagramAction(IPageMngr pageMngr, Diagram diagram) { - this.diagram = diagram; - this.pageMngr = pageMngr; - - ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); - if(pageMngr.isOpen(diagram)) { - setText("Open in New Tab"); - setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD)); - } else { - setText("Open"); - setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_BACK)); - } - - setEnabled(true); - } - - /** - * Delete the given diagram - * - * @see org.eclipse.jface.action.Action#run() - */ - @Override - public void run() { - - pageMngr.openPage(diagram); - // TransactionalEditingDomain editingDomain = - // NavigatorUtils.getTransactionalEditingDomain(); - // if (editingDomain != null) { - // - // - // EList<EObject> diagrams = diagram.eResource().getContents(); - // //TODO : synchronize with Cedric - // Command command = new RemoveCommand(editingDomain, diagrams, - // diagram); - // editingDomain.getCommandStack().execute(command); - // } - } -} |