Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2006-02-13 12:36:07 -0500
committeratikhomirov2006-02-13 12:36:07 -0500
commitf8757a97d7e3a5e73cbc0be2d438e3921bc2a2e8 (patch)
treec3712afb5d03429a0b1f9a44a2694d1fb180ef5b /plugins/org.eclipse.gmf.graphdef.codegen/templates/top
parent80e4035d3bf83b8a35983bc23587f49485a14d3e (diff)
downloadorg.eclipse.gmf-tooling-f8757a97d7e3a5e73cbc0be2d438e3921bc2a2e8.tar.gz
org.eclipse.gmf-tooling-f8757a97d7e3a5e73cbc0be2d438e3921bc2a2e8.tar.xz
org.eclipse.gmf-tooling-f8757a97d7e3a5e73cbc0be2d438e3921bc2a2e8.zip
[mgolubev] #127252 layout support
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/templates/top')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Shape.javajet18
1 files changed, 13 insertions, 5 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Shape.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Shape.javajet
index 34d9f1df9..c5854561c 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Shape.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/top/Shape.javajet
@@ -1,5 +1,5 @@
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="TopShapeGenerator"
- imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.gmfgraph.util.* org.eclipse.gmf.common.codegen.* org.eclipse.gmf.graphdef.codegen.GraphDefDispatcher java.util.*"%>
+ imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.gmfgraph.util.* org.eclipse.gmf.common.codegen.* org.eclipse.gmf.graphdef.codegen.* java.util.*"%>
<%
Object[] args = (Object[]) argument;
Shape figure = (Shape) args[0];
@@ -18,12 +18,20 @@ public class <%=figure.getName()%> extends <%=importManager.getImportedName((Str
* @generated
*/
public <%=figure.getName()%>() {
- <%=dispatcher.dispatch(figure, dispatcher.create(figure, "this"))%>
+<%
+GraphDefDispatcher.LayoutArgs dispatcherArgs = dispatcher.createLayoutArgs(figure, "this", "myGenLayoutManager");
+%>
+ <%=dispatcher.dispatch("createLayout", dispatcherArgs)%>
+ <%=dispatcher.dispatch(figure, dispatcherArgs)%>
<%
for (Iterator it = figure.getResolvedChildren().iterator(); it.hasNext();) {
- Figure next = (Figure) it.next();%>
- setFigure<%=next.getName()%>(createFigure<%=next.getName()%>());
- add(getFigure<%=next.getName()%>());
+ Figure next = (Figure) it.next();
+ final String childVarName = "child" + next.getName();%>
+
+ org.eclipse.draw2d.IFigure <%=childVarName%> = createFigure<%=next.getName()%>();
+ setFigure<%=next.getName()%>(<%=childVarName%>);
+ add(<%=childVarName%>);
+ <%=dispatcher.dispatch("createLayoutData", dispatcher.createLayoutArgs(next, childVarName, "layout" + next.getName()))%>
<%}%>
}

Back to the top