Skip to main content


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 08:09 Go to next message
Lior Missing name is currently offline Lior Missing nameFriend
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 09:56 Go to previous messageGo to next message
Lior Missing name is currently offline Lior Missing nameFriend
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 08:23 Go to previous messageGo to next message
emil salageanu is currently offline emil salageanuFriend
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 11:26 Go to previous messageGo to next message
ganesh ram is currently offline ganesh ramFriend
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 13:21 Go to previous messageGo to next message
Vitaly Savickas is currently offline Vitaly SavickasFriend
Messages: 62
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 08:52 Go to previous messageGo to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
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 - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: Dynamically extending the palette [message #1017112 is a reply to message #1016926] Sat, 09 March 2013 13:08 Go to previous message
Vitaly Savickas is currently offline Vitaly SavickasFriend
Messages: 62
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: Tue Apr 23 17:48:21 GMT 2024

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

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

Back to the top