Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » binding gmf editor with workspace resource in eclipse runtime enviornment
binding gmf editor with workspace resource in eclipse runtime enviornment [message #654063] Sun, 13 February 2011 21:30 Go to next message
saad bin abid is currently offline saad bin abidFriend
Messages: 60
Registered: October 2009
Location: Ireland
Member
Hello Community,
I am newbie to gmf based graphical editor generation. I am interested in tracing model<-> code inconsistencies in my project.

I have a code base from which i am generating model and displaying that with gmf based editor. In the model nodes I am using "qualified name" attribute which is actually representing string path to a particular file(java class) in the code base.I would like to use this attribute to trace a particular class. I would like to do the following

When I double click any particular node, I want to go to the particular class in a code base.

Can i implement this functionality while developing gmf based graphical editor? or else How can i do it? any pointers? Is there any running example available which i can have a look at?

regards
saad
Re: binding gmf editor with workspace resource in eclipse runtime enviornment [message #654129 is a reply to message #654063] Mon, 14 February 2011 09:46 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 858
Registered: July 2009
Location: Grenoble, France
Senior Member

Hi,

This is possible, you'll simply have to add an EditPolicy on your node. I think you should use an OpenEditPolicy, which listen to double-click events.

HTH

Le 13/02/2011 22:31, saad bin abid a écrit :
> Hello Community,
> I am newbie to gmf based graphical editor generation. I am interested in tracing model<-> code inconsistencies in my project.
>
> I have a code base from which i am generating model and displaying that with gmf based editor. In the model nodes I am using "qualified name" attribute which is actually representing string path to a particular file(java class) in the code base.I would like to use this attribute to trace a particular class. I would like to do the following
>
> When I double click any particular node, I want to go to the particular class in a code base.
>
> Can i implement this functionality while developing gmf based graphical editor? or else How can i do it? any pointers? Is there any running example available which i can have a look at?
>
> regards
> saad


--
Mickael Istria -- BonitaSoft S.A.
http://www.bonitasoft.com/products/BPM_download.php
Re: binding gmf editor with workspace resource in eclipse runtime enviornment [message #654134 is a reply to message #654129] Mon, 14 February 2011 10:28 Go to previous messageGo to next message
saad bin abid is currently offline saad bin abidFriend
Messages: 60
Registered: October 2009
Location: Ireland
Member
Hi Mickael,
thank you very much for your reply. Can you roughly let me know the process of how can I implement this. Do I have to extend that In code or in extension palette in plug-in? Is it GraphicalNodeEditPolicy you are talking about that listens double click events? Is there toy example available for this purpose (double clicking a graphical node and workspace resource (e.g.,file/java class) opens in a text edior )?
Thank you very much in advance for your help.
saad
Re: binding gmf editor with workspace resource in eclipse runtime enviornment [message #654141 is a reply to message #654134] Mon, 14 February 2011 11:08 Go to previous message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 858
Registered: July 2009
Location: Grenoble, France
Senior Member

Maybe this link can help: http://wiki.eclipse.org/GMF_Newsgroup_Q_and_A#How_to_change_ an_attribute_of_an_object_when_clicked.3F

The trick is to implement a subclass of openEditPolicy that will perform the action you want when double-clicking on an EditPart, and to install it on your diagram. You should create an extensions plugin for your diagram to add this class, and provide an editPolicy contribution in its plugin.xml. I let you go ahead, googling for org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders extension point.

HTH
--
Mickael Istria -- BonitaSoft S.A.
http://www.bonitasoft.com/products/BPM_download.php
Previous Topic:Image as a Node
Next Topic:Continue connector lines
Goto Forum:
  


Current Time: Mon Mar 01 06:56:12 GMT 2021

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

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

Back to the top