Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2006-01-10 16:46:00 +0000
committerashatalin2006-01-10 16:46:00 +0000
commit5e11ed6591d56650cb46227f00c2fa4828b08e03 (patch)
treea6b69361e4d6ea7161edbc9f38f3a1798370fc07 /plugins/org.eclipse.gmf.graphdef.codegen/templates
parente05f13c0962c0b216c5523c33196c526c311fba3 (diff)
downloadorg.eclipse.gmf-tooling-5e11ed6591d56650cb46227f00c2fa4828b08e03.tar.gz
org.eclipse.gmf-tooling-5e11ed6591d56650cb46227f00c2fa4828b08e03.tar.xz
org.eclipse.gmf-tooling-5e11ed6591d56650cb46227f00c2fa4828b08e03.zip
Setting scale only for Polyline & Polygon decorations.
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/templates')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/decoration.jetinc12
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/decoration.jetinc b/plugins/org.eclipse.gmf.graphdef.codegen/templates/decoration.jetinc
index a87684ad9..aad4c971d 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/decoration.jetinc
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/decoration.jetinc
@@ -1,12 +1,16 @@
<%=fqnSwitch.doSwitch(df)%> <%=decFigVarName%> = new <%=fqnSwitch.doSwitch(df)%>();
<%@ include file="FigureAttrs.jetinc"%>
<% /*include FigureChildren*/ %>
-<%if ((df instanceof PolylineDecoration || df instanceof PolygonDecoration) && !((Polyline) df).getTemplate().isEmpty()) {%>
+<%
+if ((df instanceof PolylineDecoration || df instanceof PolygonDecoration)) {
+ if (!((Polyline) df).getTemplate().isEmpty()) {
+%>
org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();
-<% for (Iterator pointIt = ((Polyline) df).getTemplate().iterator(); pointIt.hasNext(); ) {
+<% for (Iterator pointIt = ((Polyline) df).getTemplate().iterator(); pointIt.hasNext(); ) {
Point p = (Point) pointIt.next();%>
pl.addPoint(<%=p.getX()%>, <%=p.getY()%>);
-<%} /*for*/ %>
+<% } /*for*/ %>
<%=decFigVarName%>.setTemplate(pl);
+<% } /*!if getTemplate().isEmpty()*/ %>
+ <%=decFigVarName%>.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));
<%} /*if instanceof */ %>
- <%=decFigVarName%>.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3)); \ No newline at end of file

Back to the top