Programmatically create but not display diagram [message #1718897] |
Fri, 01 January 2016 11:27  |
Eclipse User |
|
|
|
Hello,
I'm developing a program that is supposed to generate a .png along with a .uml file with the data the program collects for a given class diagram. I've used UML2 and I'm able to generate the .uml file with the data of the class diagram.
I've seen in other posts that UML2 doesn't really work with graphical elements, so I've started looking into Papyrus.
I've looked for ways to generate the .png (or .jpeg) programmatically but so far the only information I've come across is this post. However, I don't want to display the diagram in any window. This program is supposed to be executed from the command line with no GUI. The only thing I'd like to do is just create some image file with the diagram.
Is this possible? I'd appreciate any help or advise I can get.
Thank you.
|
|
|
Re: Programmatically create but not display diagram [message #1719156 is a reply to message #1718897] |
Tue, 05 January 2016 11:50  |
Eclipse User |
|
|
|
Hi Raul,
The Papyrus "Export all diagrams" action works even when the Papyrus editor is closed, so it is probably what you are looking for for the Papyrus Diagram to PNG conversion (This class can be invoked programmatically)
Then you need to be able to generate Papyrus Diagrams, but that's more complex. The topic you have referenced should contain everything you need. You can load a Papyrus DiagramEditPart without actually opening the editor, using the GMF OffscreenEditPartFactory to load the Papyrus diagram
Papyrus doesn't provide automatic layout: they are provided natively by e.g. GEF/Zest or GMF, or via external projects such as ELK (Eclipse Layout Kernel)
HTH,
Camille
|
|
|
Powered by
FUDForum. Page generated in 0.04397 seconds