Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: e4c1b82b216f0120b781e0db605b63fbc44ae0f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="NewLayoutGenerator"
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.graphdef.codegen.*"%>
<%
GraphDefDispatcher.LayoutArgs argsBundle = (GraphDefDispatcher.LayoutArgs) argument;
final FigureMarker figureMarker = argsBundle.getFigure();
final String figureVarName = argsBundle.getVariableName();
final String layouterVarName = argsBundle.getManagerVariableName();
final GraphDefDispatcher dispatcher = argsBundle.getDispatcher();
%>

<%
Layout gmfLayout= figureMarker.getLayout();
if (gmfLayout != null){
	final String layouterImplClass = dispatcher.getImportManager().getImportedName((String) dispatcher.getFQNSwitch().doSwitch(gmfLayout));	
%>
		<%=layouterImplClass%> <%=layouterVarName%> = new <%=layouterImplClass%>();
		<%=argsBundle.getDispatcher().dispatch(gmfLayout, argsBundle)%>	
		<%=figureVarName%>.setLayoutManager(<%=layouterVarName%>);
<%	
}
%>

Back to the top