Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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,
Re: Dynamically extending the palette [message #1017112 is a reply to message #1016926] Sat, 09 March 2013 08:08 Go to previous message
Eclipse UserFriend
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: Mon Jul 07 22:47:51 EDT 2025

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

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

Back to the top