|
|
|
Re: Executable GMF diagrams [message #1703191 is a reply to message #1703152] |
Wed, 29 July 2015 09:09 |
Ángel Moreno Messages: 14 Registered: November 2013 Location: Madrid |
Junior Member |
|
|
Hi Luis,
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:
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getSelection()
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.
Regards,
Ángel Moreno Pérez
Enterprise Architect
El Corte Inglés, Madrid, Spain
[Updated on: Wed, 29 July 2015 09:28] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04026 seconds