Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Executable GMF diagrams(Executable GMF diagrams)
Executable GMF diagrams [message #1703015] Tue, 28 July 2015 04:05 Go to next message
Luis castro is currently offline Luis castroFriend
Messages: 3
Registered: July 2015
Junior Member
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 21:33 Go to previous messageGo to next message
Ángel Moreno is currently offline Ángel MorenoFriend
Messages: 13
Registered: November 2013
Location: Madrid
Junior Member
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,


Ángel M.
Researcher @ Kybele Research Group
Rey Juan Carlos University, Madrid, Spain
Re: Executable GMF diagrams [message #1703152 is a reply to message #1703150] Tue, 28 July 2015 22:48 Go to previous messageGo to next message
Luis castro is currently offline Luis castroFriend
Messages: 3
Registered: July 2015
Junior Member
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 09:09 Go to previous message
Ángel Moreno is currently offline Ángel MorenoFriend
Messages: 13
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 M.
Researcher @ Kybele Research Group
Rey Juan Carlos University, Madrid, Spain

[Updated on: Wed, 29 July 2015 09:28]

Report message to a moderator

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


Current Time: Thu Jun 22 12:07:58 GMT 2017

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

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