Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 497789253b6a42a08f8183ef43fcd0e8720c152f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="PolylineAttrGenerator"
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.common.codegen.* org.eclipse.gmf.graphdef.codegen.Dispatcher"%>
<%
Dispatcher.Args args = (Dispatcher.Args) argument;
final Polyline figureInstance = (Polyline) args.getFigure();
final String figureVarName = args.getVariableName();
final ImportAssistant importManager = args.getImportManager();
final Dispatcher dispatcher = args.getDispatcher();
%>
<%=dispatcher.dispatch("Shape", args)%>
<%if (!figureInstance.getTemplate().isEmpty()) {
	final String pointClassName = importManager.getImportedName("org.eclipse.draw2d.geometry.Point");
	for (java.util.Iterator pointIt = figureInstance.getTemplate().iterator(); pointIt.hasNext(); ) {
		Point p = (Point) pointIt.next();%>
		<%=figureVarName%>.addPoint(new <%=pointClassName%>(<%=p.getX()%>, <%=p.getY()%>));
<%}}%>

Back to the top