diff --git a/bundles/com.zeligsoft.domain.ngc.ccm.generator/src/com/zeligsoft/domain/ngc/ccm/generator/writers/AxciomaWriterSwitch.java b/bundles/com.zeligsoft.domain.ngc.ccm.generator/src/com/zeligsoft/domain/ngc/ccm/generator/writers/AxciomaWriterSwitch.java index 694bcbdba..6a4f50ea6 100644 --- a/bundles/com.zeligsoft.domain.ngc.ccm.generator/src/com/zeligsoft/domain/ngc/ccm/generator/writers/AxciomaWriterSwitch.java +++ b/bundles/com.zeligsoft.domain.ngc.ccm.generator/src/com/zeligsoft/domain/ngc/ccm/generator/writers/AxciomaWriterSwitch.java @@ -338,13 +338,13 @@ public Object caseUnionType(UnionType object) { @Override public Object caseStructType(StructType object) { - String commentString = "//@top-level false"; + boolean nested = true; EAnnotation annotation = object.getEAnnotation(AnnotationUtil.ZCX_ANNOTATION); - if( annotation != null ) { + if (annotation != null) { String topLevel = annotation.getDetails().get("toplevel"); - if( topLevel != null && topLevel.matches("true")) { - commentString = "//@top-level true"; + if (topLevel != null && topLevel.matches("true")) { + nested = false; } } @@ -363,10 +363,15 @@ public Object caseStructType(StructType object) { // if AXCIOMA String extensibility = "@final"; - if(object.isIsAppendable()) { + if (object.isIsAppendable()) { extensibility = "@appendable"; } buf.append(String.format("%s%s%n", indentString, extensibility)); + String nestedAnnotation = "@nested(FALSE)"; + if (nested) { + nestedAnnotation = "@nested(TRUE)"; + } + buf.append(String.format("%s%s%n", indentString, nestedAnnotation)); buf.append(String.format("%sstruct %s {%n", indentString, @@ -376,8 +381,8 @@ public Object caseStructType(StructType object) { doSwitch(m); } popScope(); - buf.append(String.format("%s}; %s%n", - indentString, commentString)); + buf.append(String.format("%s}; %n", + indentString)); conditionalNewLine(); return buf.toString(); }