Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/xpt/editor/GenDiagram.qvto')
-rw-r--r--plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/xpt/editor/GenDiagram.qvto42
1 files changed, 0 insertions, 42 deletions
diff --git a/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/xpt/editor/GenDiagram.qvto b/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/xpt/editor/GenDiagram.qvto
deleted file mode 100644
index 06f9dea6566..00000000000
--- a/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/xpt/editor/GenDiagram.qvto
+++ /dev/null
@@ -1,42 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2007, 2020 Borland Software Corporation, CEA LIST, Artal
- *
- * 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:
- * Artem Tikhomirov (Borland) - initial API and implementation
- * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Bug 569174
- *****************************************************************************/
-
-import gmf.GenModelUtils;
-
-modeltype gmfgen uses "http://www.eclipse.org/papyrus/gmf/2020/GenModel";
-modeltype genmodel uses "http://www.eclipse.org/emf/2002/GenModel";
-modeltype ecore uses "http://www.eclipse.org/emf/2002/Ecore";
-
-library GenDiagram;
-
-helper standaloneDomainModel(genDiagram : gmfgen::GenDiagram) : Boolean {
- return not genDiagram.editorGen.sameFileForDiagramAndModel and genDiagram.domainDiagramElement <> null
-}
-
-helper hasDocumentRoot(genDiagram : gmfgen::GenDiagram) : Boolean {
- return getDocumentRoot(genDiagram) <> null
-}
-
-helper getDocumentRoot(genDiagram : gmfgen::GenDiagram) : genmodel::GenClass {
- return (if genDiagram.domainDiagramElement = null then null else getDocumentRoot(genDiagram.domainDiagramElement.genPackage) endif)
-}
-
-helper getDocumentRootSetFeature(genDiagram : gmfgen::GenDiagram) : genmodel::GenFeature {
- return getDocumentRoot(genDiagram).genFeatures->select(f | isDocRootSetFeature(f, genDiagram.domainDiagramElement.ecoreClass))->first()
-}
-
-helper isDocRootSetFeature(gf : genmodel::GenFeature, eType : ecore::EClass) : Boolean {
- return not isListType(gf) and gf.ecoreFeature.changeable and (-2 = gf.ecoreFeature.upperBound and (gf.ecoreFeature.oclAsType(ecore::EObject).eClass().name = 'EReference' and gf.ecoreFeature.eType.oclAsType(ecore::EClass).isSuperTypeOf(eType)))
-}

Back to the top