Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: 2fc5a57048180f407c782c8010136cc95b3bf5b9 (plain) (tree)
1
2
3
4
5
6
7
8
                                                                                          
                                                                                                                                   
  
                                                                  

                                                            

                                                                    







                                                                                                         
<%@ 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.GraphDefDispatcher"%>
<%
GraphDefDispatcher.Args args = (GraphDefDispatcher.Args) argument;
final Polyline figureInstance = (Polyline) args.getFigure();
final String figureVarName = args.getVariableName();
final GraphDefDispatcher dispatcher = args.getDispatcher();
final ImportAssistant importManager = dispatcher.getImportManager();
%>
<%=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