Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gendoc » How to insert a part of class diagram?
How to insert a part of class diagram? [message #1751079] Wed, 04 January 2017 10:40 Go to next message
sh paek is currently offline sh paekFriend
Messages: 3
Registered: December 2016
Junior Member
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 Go to previous messageGo to next message
Antonio Campesino is currently offline Antonio CampesinoFriend
Messages: 56
Registered: August 2016
Member
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
Re: How to insert a part of class diagram? [message #1751322 is a reply to message #1751079] Sun, 08 January 2017 15:34 Go to previous message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
Hello I agree with Antonio's answer
A bug has to be opened but take care you have to give a sequence :
- so it is generally needed to do <ocl expression>->asSequence()




Previous Topic:What is escape character?
Next Topic:New category in the Gendoc wiki : Samples
Goto Forum:
  


Current Time: Thu Mar 28 16:13:27 GMT 2024

Powered by FUDForum. Page generated in 0.02312 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top