Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2006-08-24 09:13:36 -0400
committeratikhomirov2006-08-24 09:13:36 -0400
commit602bd6b0125c6564436cf870100d413d0e0f6bd7 (patch)
tree42a39366e32d491ffc5bc0635acf7dd0f6d82983 /plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/CustomClass.javajet
parent4000ac816f4a9f03d43ad13ce3eacca4868565bc (diff)
downloadorg.eclipse.gmf-tooling-602bd6b0125c6564436cf870100d413d0e0f6bd7.tar.gz
org.eclipse.gmf-tooling-602bd6b0125c6564436cf870100d413d0e0f6bd7.tar.xz
org.eclipse.gmf-tooling-602bd6b0125c6564436cf870100d413d0e0f6bd7.zip
[154683] mgolubev - Handle custom borders.
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/templates/attr/CustomClass.javajet')
-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