Hi,
I’m struggling with a report for a while now.
Based on the reports delivered with the ‘Report Writer’ and a custom one I found on this forum I’m trying to create the following structure from the project root (“VPProject”):
1.0.0.0.0) Title: classes
1.1.0.0.0) List: Sub-Title: Class diagram name 1
1.1.1.0.0) Image: class diagram
1.1.2.0.0) Documentation of diagram
1.1.3.0.0) List: Sub-Sub-Title: class names from the diagram (also from dependant projects)
1.1.3.1.0) Documentation, Stereotypes and Tagged Values of Class
1.1.3.2.0) List: Sub-Sub-Sub-Title: attribute names
1.1.3.2.1) Table of:
1.1.3.2.2) Documentation, Type, Default value, Stereotypes and Tagged Values of Attribute
Somehow, it is not possible to display the attribute details.
One of my many attempts:
<?xml version="1.0" encoding="UTF-8"?>
<Template>
<TemplateInformationHeader name="5.1 Class Diagrams" description="/" type="table" default="true"/>
<ProjectBaseInitiationBlock>
<ParagraphBreak/>
<HasDiagramChecker type="ClassDiagram">
<ForEachDiagram diagramType="ClassDiagram">
<StringPropertyText propertyText="name" style="Heading 2"/>
<ParagraphBreak/>
<StaticText content="" style="Default"/>
<ElementImage imageType="diagram" alignment="center"/>
<ParagraphBreak/>
<HasChildElementChecker flag = "true">
<IterationBlock modelType="Class" allLevel="true">
<!-- class -->
<!-- class's name -->
<StaticText content="Class : " style="Heading 3"/>
<StringPropertyText propertyText="name" style="Heading 3"/>
<ParagraphBreak/>
<!-- class's documentation -->
<ValueConditionChecker property="documentation" operator="not equals" value="">
<StaticText content="Description: " style="Default"/>
<ParagraphBreak/>
<StringPropertyText propertyText="documentation" style="Default"/>
<ParagraphBreak/>
</ValueConditionChecker>
<!-- class's stereotypes -->
<HasMetaModelPropertyChecker property="stereotypes" flag="true">
<StaticText content="Stereotypes: " style="Default"/>
<ForEach property="stereotypes" ignoreParagraphBreakForLastModel="true">
<!-- <StaticText content="- " style="Default"/> -->
<StaticText content="' " style="Default"/>
<StringPropertyText propertyText="name" style="Default"/>
<StaticText content=" ', " style="Default"/>
<!-- <StaticText content="\n" style="Default"/>-->
</ForEach>
<StaticText content="' " style="Default"/>
<ParagraphBreak/>
</HasMetaModelPropertyChecker>
<HasChildElementChecker flag = "true">
<TableBlock colWidths = "5000,5000" tableWidth = "14500" alignment = "right">
<TableRow>
<TableCell leftBorderEnable = "false" rightBorderEnable = "false" color = "230, 230, 230">
<StaticText content = "Name" style = "Column header 1"/>
</TableCell>
<TableCell leftBorderEnable = "false" rightBorderEnable = "false" color = "230, 230, 230">
<StaticText content = "Type" style = "Column header 1"/>
</TableCell>
</TableRow>
<IterationBlock>
<TableRow>
<TableCell leftBorderEnable = "false" rightBorderEnable = "false">
<StringPropertyText propertyText = "name" style = "Table Contents"/>
</TableCell>
<TableCell leftBorderEnable = "false" rightBorderEnable = "false">
<StringPropertyText propertyText = "modelType" style = "Table Contents"/>
</TableCell>
</TableRow>
</IterationBlock>
</TableBlock>
</HasChildElementChecker>
<TableBlock colWidths = "4000,2500,10000," tableWidth = "16000" alignment = "right">
<TableRow>
<TableCell leftBorderEnable = "false" rightBorderEnable = "false" color = "230, 230, 230">
<StaticText content = "Name" style = "Column header 1"/>
</TableCell>
<TableCell leftBorderEnable = "false" rightBorderEnable = "false" color = "230, 230, 230">
<StaticText content = "Type" style = "Column header 1"/>
</TableCell>
<TableCell leftBorderEnable = "false" rightBorderEnable = "false" color = "230, 230, 230">
<StaticText content = "Info" style = "Column header 1"/>
</TableCell>
</TableRow>
<IterationBlock>
<TableRow>
<TableCell leftBorderEnable = "false" rightBorderEnable = "false">
<StringPropertyText propertyText = "name" style = "Table Contents"/>
</TableCell>
<TableCell leftBorderEnable = "false" rightBorderEnable = "false">
<StringPropertyText propertyText = "modelType" style = "Table Contents"/>
</TableCell>
<TableCell leftBorderEnable = "false" rightBorderEnable = "false">
<StringPropertyText propertyText = "documentation" style = "Table Contents"/>
</TableCell>
</TableRow>
</IterationBlock>
</TableBlock>
<!-- attributes of class -->
<HasChildElementChecker modelType="Attribute" flag="true">
<ParagraphBreak/>
<IterationBlock modelType="Attribute">
<!-- attribute -->
<!-- attribute's name -->
<StaticText content="- " isBold="true"/>
<StringPropertyText propertyText="name" style="Default"/>
<ParagraphBreak/>
<!-- attribute's type -->
<ValueConditionChecker property="type" operator="not equals" value="">
<StaticText content="Type: " style="Default"/>
<StringPropertyText propertyText="type" style="Default"/>
<ParagraphBreak/>
</ValueConditionChecker>
<!-- attribute's documentation -->
<ValueConditionChecker property="documentation" operator="not equals" value="">
<StaticText content="Documentation: " style="Default"/>
<ParagraphBreak/>
<StringPropertyText propertyText="documentation" style="Default"/>
<ParagraphBreak/>
</ValueConditionChecker>
<!-- attribute's multiplicity -->
<DefaultConditionChecker property="multiplicity" flag="false">
<StaticText content="Multiplicity: " style="Default"/>
<StringPropertyText propertyText="multiplicity" style="Default"/>
<ParagraphBreak/>
</DefaultConditionChecker>
</IterationBlock>
</HasChildElementChecker>
</IterationBlock>
</HasChildElementChecker>
<ParagraphBreak/>
</ForEachDiagram>
</HasDiagramChecker>
<StaticText content="" style="Default"/>
</ProjectBaseInitiationBlock>
</Template>
Best regards,
Marqui