Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Dynamically extending the palette
Dynamically extending the palette [message #663682] Wed, 06 April 2011 04:09 Go to next message
Lior Missing name is currently offline Lior Missing name
Messages: 18
Registered: February 2011
Junior Member
Hello Everyone!
I have a model that contains a general EClass that serves as a node in the diagram (and of course, a tool in the diagram).
This general class has some parameters and attributes the user can set in runtime

I'd like to *dynamically* add to the palette more tools from the type of that EClass with some of its parameters and attributes already pre-set. (For example, if the general EClass was 'Fruit' I'd like to add more tools from the type 'Fruit' with their name set to 'Apples', 'Oranges', etc)

I've searched through google and the forum and found some references to solutions suggesting to implement IPaletteProvide as well as modifying generated code.

Since I'm pretty new to GMF, I'm having some trouble figuring out how exactly this process works. for example - where do I create the tools? where do I add them to the palette? where do I bind the created tools to the objects with their pre-set parameters?

If you happen to know a code example with some of the above , it would be great!
Thanks a lot
Lior
Re: Dynamically extending the palette [message #664583 is a reply to message #663682] Mon, 11 April 2011 05:56 Go to previous messageGo to next message
Lior Missing name is currently offline Lior Missing name
Messages: 18
Registered: February 2011
Junior Member
OK Found a nice solution.
It is described here:
http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg14209.html

Basically , you dynamically create tools on the palette and set their attribute on creation time using SetCommand
Re: Dynamically extending the palette [message #665298 is a reply to message #663682] Thu, 14 April 2011 04:23 Go to previous messageGo to next message
emil salageanu is currently offline emil salageanu
Messages: 94
Registered: June 2010
Location: Nice, France
Member
Hi,
I'm very interested in this topic, thanks for the link Smile
Re: Dynamically extending the palette [message #779711 is a reply to message #664583] Mon, 16 January 2012 06:26 Go to previous messageGo to next message
ganesh ram is currently offline ganesh ram
Messages: 26
Registered: January 2012
Junior Member
The link above seems to be broken Sad
i have the same req as described above.
Re: Dynamically extending the palette [message #1016717 is a reply to message #779711] Thu, 07 March 2013 08:21 Go to previous messageGo to next message
Vitaly Savickas is currently offline Vitaly Savickas
Messages: 61
Registered: March 2010
Member
I'd like to hear the solution as well. Please, anyone knows how to get to that broken link? Or a hint on a solution?

Regards,
Vitaly
Re: Dynamically extending the palette [message #1016926 is a reply to message #1016717] Fri, 08 March 2013 03:52 Go to previous messageGo to next message
Aurelien Pupier is currently offline Aurelien Pupier
Messages: 558
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi,

perhaps it was this link: http://www.eclipse.org/forums/index.php/t/51363/

If you want a sample on how to override the genrated code of the palette and then be able to plug what you want, you can take a look to BonitaSoft code here

regards,


Aurélien Pupier - BonitaSoft S.A.
My blog
My company Eclipse-related blog
Re: Dynamically extending the palette [message #1017112 is a reply to message #1016926] Sat, 09 March 2013 08:08 Go to previous message
Vitaly Savickas is currently offline Vitaly Savickas
Messages: 61
Registered: March 2010
Member
Aurelien,

On behalf of everyone thank you for the link!
Previous Topic:Possible NullPointerException in GMF
Next Topic:[Zest] Different Connections
Goto Forum:
  


Current Time: Thu Aug 28 23:44:01 EDT 2014

Powered by FUDForum. Page generated in 0.03004 seconds