Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2006-03-30 17:39:09 -0500
committeratikhomirov2006-03-30 17:39:09 -0500
commitdb90f31eb82df700d5759efae2142c6576e7dbf9 (patch)
treee277968672b43fbd079503c10e92f3114c40734e /plugins/org.eclipse.gmf.graphdef.codegen/templates/attr
parent20861a6d1d320dbdd070f125e24d7ad25c32c321 (diff)
downloadorg.eclipse.gmf-tooling-db90f31eb82df700d5759efae2142c6576e7dbf9.tar.gz
org.eclipse.gmf-tooling-db90f31eb82df700d5759efae2142c6576e7dbf9.tar.xz
org.eclipse.gmf-tooling-db90f31eb82df700d5759efae2142c6576e7dbf9.zip
[mgolubev] #134097 Invalid code is generated for the node figure with XYLayout
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/templates/attr')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/CustomClass.javajet6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/CustomClass.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/CustomClass.javajet
index 5d7424e22..fa176f2d8 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/CustomClass.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/CustomClass.javajet
@@ -4,9 +4,11 @@
final CustomClass instance = (CustomClass) ((Object[]) argument)[0];
//final GraphDefDispatcher dispatcher = (GraphDefDispatcher) ((Object[]) argument)[1];
final String varName = (String) ((Object[]) argument)[2];
+final boolean hasAttributes = !instance.getAttributes().isEmpty();
%>
-
+<% if (hasAttributes) {%>
{
+<% }%>
<%
int attrIndex = 0;
for (Iterator attrs = instance.getAttributes().iterator(); attrs.hasNext(); attrIndex++){
@@ -32,5 +34,7 @@ for (Iterator attrs = instance.getAttributes().iterator(); attrs.hasNext(); attr
<%
} //for
%>
+<% if (hasAttributes) {%>
}
+<% }%>

Back to the top