|Dynamically extending the palette [message #663682]
||Wed, 06 April 2011 04:09
| Lior Missing name
Registered: February 2011
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
Powered by FUDForum
. Page generated in 0.01807 seconds