Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2006-02-06 13:10:22 -0500
committeratikhomirov2006-02-06 13:10:22 -0500
commitab3cbec7ac30ebc2acac1565d3a11e5de969c32b (patch)
tree6975082a424975a565a3ea20368f2279f968c1c2 /plugins/org.eclipse.gmf.graphdef.codegen/templates/new/Figure.javajet
parent6e7a0cab3de84e293361d07e3545872589e22f68 (diff)
downloadorg.eclipse.gmf-tooling-ab3cbec7ac30ebc2acac1565d3a11e5de969c32b.tar.gz
org.eclipse.gmf-tooling-ab3cbec7ac30ebc2acac1565d3a11e5de969c32b.tar.xz
org.eclipse.gmf-tooling-ab3cbec7ac30ebc2acac1565d3a11e5de969c32b.zip
major refactoring of gmfgraph codegen utilizing dispatcher infrastructure
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/templates/new/Figure.javajet')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/new/Figure.javajet13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/new/Figure.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/new/Figure.javajet
new file mode 100644
index 000000000..0c380c210
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/new/Figure.javajet
@@ -0,0 +1,13 @@
+<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="NewFigureGenerator"
+ imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.common.codegen.* org.eclipse.gmf.graphdef.codegen.Dispatcher"%>
+<%
+Dispatcher.Args args = (Dispatcher.Args) argument;
+final Figure figureInstance = args.getFigure();
+final String figureVarName = args.getVariableName();
+final ImportAssistant importManager = args.getImportManager();
+final String figureClassName = importManager.getImportedName((String) args.getFQNSwitch().doSwitch(figureInstance));
+
+// PRODUCES instance AND (!) initializes attributes
+%>
+<%=figureClassName%> <%=figureVarName%> = new <%=figureClassName%>();
+<%=args.getDispatcher().dispatch(figureInstance, args)%> \ No newline at end of file

Back to the top