Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/templates/attr')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/CustomClass.javajet9
1 files changed, 6 insertions, 3 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 fa176f2d8..afd9d391e 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,12 @@
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();
+boolean insertingArbitraryCode = false;
+for (Iterator attributes = instance.getAttributes().iterator(); !insertingArbitraryCode && attributes.hasNext();){
+ insertingArbitraryCode = ((CustomAttribute)attributes.next()).isMultiStatementValue();
+}
%>
-<% if (hasAttributes) {%>
+<% if (insertingArbitraryCode) {%>
{
<% }%>
<%
@@ -34,7 +37,7 @@ for (Iterator attrs = instance.getAttributes().iterator(); attrs.hasNext(); attr
<%
} //for
%>
-<% if (hasAttributes) {%>
+<% if (insertingArbitraryCode) {%>
}
<% }%>

Back to the top