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

                                                                                                                           




                                                              
                                                   
  

                                    






                                                                                    
                                                                                                                                                               



                                                                                     
                                            
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="ShapeAttrGenerator"
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.common.codegen.* org.eclipse.gmf.graphdef.codegen.Dispatcher"%>
<%
Dispatcher.Args args = (Dispatcher.Args) argument;
final Shape figureInstance = (Shape) args.getFigure();
final String figureVarName = args.getVariableName();
final ImportAssistant importManager = args.getImportManager();
final Dispatcher dispatcher = args.getDispatcher();
%>
<%
// PERHAPS, do this with reflection?
%><%if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getShape_Fill())) {%>
		<%=figureVarName%>.setFill(<%=figureInstance.isFill()%>);
<%} if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getShape_Outline())) {%>
		<%=figureVarName%>.setOutline(<%=figureInstance.isOutline()%>);
<%} if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getShape_LineWidth())) {%>
		<%=figureVarName%>.setLineWidth(<%=figureInstance.getLineWidth()%>);
<%} if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getShape_LineKind())) {%>
		<%=figureVarName%>.setLineStyle(<%=importManager.getImportedName("org.eclipse.draw2d.Graphics")%>.<%=figureInstance.getLineKind().getName()%>);
<%} if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getShape_XorFill())) {%>
		<%=figureVarName%>.setFillXOR(<%=figureInstance.isXorFill()%>);
<%} if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getShape_XorOutline())) {%>
		<%=figureVarName%>.setOutlineXOR(<%=figureInstance.isXorOutline()%>);
<%}%><%=dispatcher.dispatch("Figure", args)%>

Back to the top