Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 493aeb620369bb1c357159593c12391e2bbc8592 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="NewFigureGenerator"
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.graphdef.codegen.*"%>
<%
GraphDefDispatcher.Args args = (GraphDefDispatcher.Args) argument;
final Figure figureInstance = args.getFigure();
final String figureVarName = args.getVariableName();
final GraphDefDispatcher dispatcher = args.getDispatcher();
final String figureClassName = dispatcher.getImportManager().getImportedName((String) dispatcher.getFQNSwitch().doSwitch(figureInstance));

// PRODUCES instance AND (!) initializes attributes
%>
<%=figureClassName%> <%=figureVarName%> = new <%=figureClassName%>();
<%=args.getDispatcher().dispatch(figureInstance, args)%>
<%=args.getDispatcher().dispatch("createLayout", dispatcher.getLayoutArgsFor(args))%>

Back to the top