Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/xpt/navigator/getEditorInput.xpt')
-rw-r--r--plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/xpt/navigator/getEditorInput.xpt41
1 files changed, 0 insertions, 41 deletions
diff --git a/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/xpt/navigator/getEditorInput.xpt b/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/xpt/navigator/getEditorInput.xpt
deleted file mode 100644
index c19e79f97fb..00000000000
--- a/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/xpt/navigator/getEditorInput.xpt
+++ /dev/null
@@ -1,41 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2007, 2020 Borland Software Corporation, CEA LIST, Artal and others
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Alexander Shatalin (Borland) - initial API and implementation
- * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Bug 569174
- *****************************************************************************/
-
-«IMPORT 'http://www.eclipse.org/papyrus/gmf/2020/GenModel'»
-
-«DEFINE getEditorInput FOR gmfgen::GenEditorGenerator-»
-«EXPAND xpt::Common::generatedMemberComment»
-private static org.eclipse.ui.IEditorInput getEditorInput(org.eclipse.gmf.runtime.notation.Diagram diagram) {
- org.eclipse.emf.ecore.resource.Resource diagramResource = diagram.eResource();
-«IF null = application-»
- «EXPAND CodeStyle::iterate('nextEObject', 'org.eclipse.emf.ecore.EObject', 'diagramResource.getContents()') FOR diagram-»
- if (nextEObject == diagram) {
- return new org.eclipse.ui.part.FileEditorInput(org.eclipse.emf.workspace.util.WorkspaceSynchronizer.getFile(diagramResource));
- }
- if (nextEObject instanceof org.eclipse.gmf.runtime.notation.Diagram) {
- break;
- }
- }
-«ENDIF-»
- «EXPAND defineURIEditorInput('diagram', 'editorInput') FOR diagram-»
- return editorInput;
-}
-«ENDDEFINE»
-
-«DEFINE defineURIEditorInput(diagramVarName : String, editorInputVarName : String) FOR gmfgen::GenDiagram-»
-org.eclipse.emf.common.util.URI uri = org.eclipse.emf.ecore.util.EcoreUtil.getURI(«diagramVarName»);
-String editorName = uri.lastSegment() + '#' + «diagramVarName».eResource().getContents().indexOf(«diagramVarName»);
-org.eclipse.ui.IEditorInput «editorInputVarName» = new org.eclipse.emf.common.ui.URIEditorInput(uri, editorName);
-«ENDDEFINE»

Back to the top