Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsRotate Diagram Element
https://www.eclipse.org/forums/index.php/mv/msg/1102732/1822395/#msg_1822395
I would like to rotate a diagram element programmatically, specifically a Square shape. I would like to give the user this functionality, that is why I was thinking of using a Sirius Java Extension Java Call. That would be possible? Thanks in advance.
Cheers,
Anthony]]>Antonio Garmendia2020-03-05T15:59:15-00:00Re: Rotate Diagram Element
https://www.eclipse.org/forums/index.php/mv/msg/1102732/1822528/#msg_1822528
Will you have some info stored in your model, in this case, you might simply create a set of conditional styles or style customizations ?
The plugin org.obeonetwork.dsl.uml2.design declares the rotatable in its plugin.xml, the id is "org.obeonetwork.dsl.uml2.design.ui.extension.rotableNode.requiredInterface".
The odesign use a CustomStyleDescription with id "org.obeonetwork.dsl.uml2.design.ui.extension.rotableNode.requiredInterface" for the corresponding mappings.
Those rotatable ports are oriented regarding the first location of the first bendpoint of the edge connected to the interface.
Regards]]>Maxime Porhel2020-03-09T13:16:08-00:00Re: Rotate Diagram Element
https://www.eclipse.org/forums/index.php/mv/msg/1102732/1822557/#msg_1822557
Thanks for your response. The thing is that I do not have any information stored in my model. Currently, I am developing an editor for Petri nets, so I would like a feature that rotates the transitions (Square shape) 90 degrees depending on the user's wishes. That would be possible?
I have been searching in the Sirius API, but nothing so far. I just discover the SiriusGMFHelper.getGmfView, but currently I am just able to change the position of the element, but in the editor is not refreshed well.
Would you please give me any other hint or maybe some sample code I can look at? Thanks in advance.
Cheers,
Anthony]]>Antonio Garmendia2020-03-09T19:42:13-00:00Re: Rotate Diagram Element
https://www.eclipse.org/forums/index.php/mv/msg/1102732/1822743/#msg_1822743
Finally, I implemented a solution based on your answer in this post [1]. I did not know that it is possible to add DAnnotation to the *.aird.