Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2006-11-02 16:58:29 -0500
committeratikhomirov2006-11-02 16:58:29 -0500
commit87f9ae89b931710cf24bd695b81ab8e3d219c88a (patch)
treec0382fe2792d9359c1ee17ca9a346eb22bf21b29 /plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/CustomClass.xpt
parentbfa530a7515d8bc44f9d0c4d89d6db7ad9403dda (diff)
downloadorg.eclipse.gmf-tooling-87f9ae89b931710cf24bd695b81ab8e3d219c88a.tar.gz
org.eclipse.gmf-tooling-87f9ae89b931710cf24bd695b81ab8e3d219c88a.tar.xz
org.eclipse.gmf-tooling-87f9ae89b931710cf24bd695b81ab8e3d219c88a.zip
JET templates for gmfgraph model replaced with Xpand counterparts.
MapMode handling simplified
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/CustomClass.xpt')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/CustomClass.xpt37
1 files changed, 37 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/CustomClass.xpt b/plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/CustomClass.xpt
new file mode 100644
index 000000000..26b38b281
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/CustomClass.xpt
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2006 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 "http://www.eclipse.org/gmf/2005/GraphicalDefinition"»
+«IMPORT "http://www.eclipse.org/emf/2002/Ecore"»
+«EXTENSION Util»
+
+«DEFINE Init(EString instanceVarName) FOR gmfgraph::CustomClass»
+«EXPAND customAttribute(instanceVarName) FOREACH attributes»
+«ENDDEFINE»
+
+«DEFINE customAttribute(EString instanceVarName) FOR gmfgraph::CustomAttribute»
+«EXPAND customAttrValueImpl-»
+«IF directAccess»
+«instanceVarName».«name» = «EXPAND customAttrValue»;
+«ELSE»
+«instanceVarName».set«name.toFirstUpper()»(«EXPAND customAttrValue»);
+«ENDIF»
+«ENDDEFINE»
+
+«DEFINE customAttrValueImpl FOR gmfgraph::CustomAttribute»
+«IF multiStatementValue-»
+«messageFormat(value, {"attr" + name.toFirstUpper()})-»
+«ENDIF-»
+«ENDDEFINE»
+
+«DEFINE customAttrValue FOR gmfgraph::CustomAttribute»
+«IF multiStatementValue»attr«name.toFirstUpper()»«ELSE-»«value»«ENDIF-»
+«ENDDEFINE» \ No newline at end of file

Back to the top