|Re: Executable GMF diagrams [message #1703191 is a reply to message #1703152]
||Wed, 29 July 2015 09:09
| Ángel Moreno
Registered: November 2013
Under my point of view, the best way to apply actions to an EditPart or group of EditPart's selected it's to use the Popup Menu of the GMF Diagram generated. In a last message I published the point of access to the Popup Menu of a GMF Diagram generated by the GMF Dashboard, here is the post. From this point, you have to study how to create classes that implements the IAction interface, how to add to this classes the behaviour that you want to implement and how to add this actions to Popup Menu as menu Items.
Here, you have a small code that allow you get the selected items of your diagram:
I recommend you study how it's works the code of deleteAction declared in the DiagramEditorContextMenuProvider class, for example, or study how to create classes that extends the AbstractActionHandler class.
Researcher @ Kybele Research Group
Rey Juan Carlos University, Madrid, Spain
[Updated on: Wed, 29 July 2015 09:28]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01989 seconds