Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/templates.migrated/Decoration.xpt')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates.migrated/Decoration.xpt34
1 files changed, 34 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates.migrated/Decoration.xpt b/plugins/org.eclipse.gmf.graphdef.codegen/templates.migrated/Decoration.xpt
new file mode 100644
index 000000000..47331504f
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates.migrated/Decoration.xpt
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2006, 2007 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/2006/GraphicalDefinition'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«EXTENSION Util»
+
+«REM»Instantiate and define attributes for DecorationFigures«ENDREM»
+
+«DEFINE Instantiate(figureVarName : String) FOR gmfgraph::DecorationFigure-»
+«EXPAND Runtime::newInstance(figureVarName)»
+«EXPAND Attrs::Init(figureVarName)»
+«ENDDEFINE»
+
+«REM»Guess, can't delegate to attrs through Attrs::Init because there's already Init for Polyline«ENDREM»
+«DEFINE Instantiate(figureVarName : String) FOR gmfgraph::PolylineDecoration-»
+«EXPAND Runtime::newInstance(figureVarName)»
+«EXPAND attr::Decoration::polylineAttrs(figureVarName)-»
+«ENDDEFINE»
+
+«REM»Copy of above template for PolylineDecoration, just because PolygonDecoration doesn't extend PolylineDecoration in draw2d and gmfgraph«ENDREM»
+«DEFINE Instantiate(figureVarName : String) FOR gmfgraph::PolygonDecoration-»
+«EXPAND Runtime::newInstance(figureVarName)»
+«EXPAND attr::Decoration::polylineAttrs(figureVarName)-»
+«ENDDEFINE» \ No newline at end of file

Back to the top