Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Executable GMF diagrams(Executable GMF diagrams)
Executable GMF diagrams [message #1703015] Tue, 28 July 2015 00:05 Go to next message
Eclipse UserFriend
Hi,

I need help about:

How, i can create an executable diagram using GMF?
Re: Executable GMF diagrams [message #1703150 is a reply to message #1703015] Tue, 28 July 2015 17:33 Go to previous messageGo to next message
Eclipse UserFriend
Hi Luis,

In the GMF Dashboard you have an option (a checkbox) to create an RCP version of the GMF Diagram that you want to create. A RCP is a Rich Client Platform... in other words... a simple desktop application of your GMF Diagram.

You have a small tutorial in this page:
https://wiki.eclipse.org/Graphical_Modeling_Framework/Tutorial/Part_4

Regards,
Re: Executable GMF diagrams [message #1703152 is a reply to message #1703150] Tue, 28 July 2015 18:48 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ángel,

Thanks for your answer. I checked the tutorial.

However, now my question is: how to able the execution of any procedure or expression when i select any element in the generated diagram.

I appreciate your collaboration,

Regards,
Re: Executable GMF diagrams [message #1703191 is a reply to message #1703152] Wed, 29 July 2015 05:09 Go to previous message
Eclipse UserFriend
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,


[Updated on: Wed, 29 July 2015 05:28] by Moderator

Previous Topic:No palette icons after installing plugin into host
Next Topic:Dynamic Node Color Change
Goto Forum:
  


Current Time: Wed Jul 23 18:17:29 EDT 2025

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

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

Back to the top