How to insert a part of class diagram? [message #1751079] |
Wed, 04 January 2017 10:40  |
Eclipse User |
|
|
|
Hello,
I'm looking for method to insert a part of class diagram to document.
A class diagram has several packages in my project
Can a package part of class diagram be inserted to document?
Thanks
|
|
|
Re: How to insert a part of class diagram? [message #1751133 is a reply to message #1751079] |
Wed, 04 January 2017 19:15   |
Eclipse User |
|
|
|
I am not sure if what you want is:
a ) include in the document a diagram, but only showing part of the elements in the diagram
There is a operation defined in the GMF bundle defined for this purpose: getDiagram(d : notation::Diagram, elements : Sequence(OclAny)) which produce the image of the diagram hidding all the elements that are not provided as second element.
You can use it in a template as:
<image object="d.getDiagram(<ocl expression selecting the elements to display>)" ...>
...
</image>
Trying that function today I come into a issue (Bug 509948) that prevent this approach to work in some cases.
b) If you want use a diagram to access the elements that are shown in the diagram:
In this case just use 'd.getElementsInDiagram()' in a for, something like that:
[for (p : uml::Package | d.getElementsInDiagram()->filter(uml::Package))]
...
[/for]
Regards,
Antonio
|
|
|
|
Powered by
FUDForum. Page generated in 0.04191 seconds