Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates/xpt/editor/GenDiagram.qvto')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/GenDiagram.qvto26
1 files changed, 19 insertions, 7 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/GenDiagram.qvto b/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/GenDiagram.qvto
index 4a355e60b..2efefe54d 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/GenDiagram.qvto
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/GenDiagram.qvto
@@ -1,27 +1,39 @@
+/*
+ * Copyright (c) 2007, 2009 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+
import org.eclipse.gmf.internal.codegen.util.GenModelUtils;
-modeltype genModel uses "http://www.eclipse.org/gmf/2008/GenModel";
-modeltype genModel_1 uses "http://www.eclipse.org/emf/2002/GenModel";
+modeltype gmfgen uses "http://www.eclipse.org/gmf/2009/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 : genModel::GenDiagram) : Boolean {
+helper standaloneDomainModel(genDiagram : gmfgen::GenDiagram) : Boolean {
return not genDiagram.editorGen.sameFileForDiagramAndModel and genDiagram.domainDiagramElement <> null
}
-helper hasDocumentRoot(genDiagram : genModel::GenDiagram) : Boolean {
+helper hasDocumentRoot(genDiagram : gmfgen::GenDiagram) : Boolean {
return getDocumentRoot(genDiagram) <> null
}
-helper getDocumentRoot(genDiagram : genModel::GenDiagram) : genModel_1::GenClass {
+helper getDocumentRoot(genDiagram : gmfgen::GenDiagram) : genmodel::GenClass {
return (if genDiagram.domainDiagramElement = null then null else getDocumentRoot(genDiagram.domainDiagramElement.genPackage) endif)
}
-helper getDocumentRootSetFeature(genDiagram : genModel::GenDiagram) : genModel_1::GenFeature {
+helper getDocumentRootSetFeature(genDiagram : gmfgen::GenDiagram) : genmodel::GenFeature {
return getDocumentRoot(genDiagram).genFeatures->select(f | isDocRootSetFeature(f, genDiagram.domainDiagramElement.ecoreClass))->first()
}
-helper isDocRootSetFeature(gf : genModel_1::GenFeature, eType : ecore::EClass) : Boolean {
+helper isDocRootSetFeature(gf : genmodel::GenFeature, eType : ecore::EClass) : Boolean {
return not isListType(gf) and gf.ecoreFeature.changeable and (-2 = gf.ecoreFeature.upperBound.oclAsType(Integer) and (gf.ecoreFeature.eClass().name = 'EReference' and gf.ecoreFeature.eType.oclAsType(ecore::EClass).isSuperTypeOf(eType)))
}

Back to the top