Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » GMF Palette getting to know the node that was selected
GMF Palette getting to know the node that was selected [message #780181] Tue, 17 January 2012 05:10 Go to next message
Eclipse UserFriend
Hi,

I created a dynamic palette by adding my custom nodes in MindmapPaletteFactory.fillPalette().

The palette shows up fine with the nodes (TopicA and TopicB).
Now when i select TopicA from the palette, how would i get to know in the code, the node that was selected.

Specifically, in the TopicCreateCommand, i would like to know the node that was selected.

Depending on which node is selected, i want do some custom actions.

Pls help.
Re: GMF Palette getting to know the node that was selected [message #780653 is a reply to message #780181] Wed, 18 January 2012 16:52 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

I am not sure I completely understood you, but you may put whatever you want into the extendedMetadata of the request returned from your tool in UnspecifiedTypeCreationTool#createTargetRequest.

If your toolA/toolB puts the ("From Tool" -> "A" / "B") pairs here, then in the TopicCreateCommand you should be able to access this via request.getParameter("From Tool").

Hope this helps,
Regards,
Michael "Borlander" Golubev
Re: GMF Palette getting to know the node that was selected [message #780788 is a reply to message #780653] Thu, 19 January 2012 06:31 Go to previous message
Eclipse UserFriend
Thats excatly what i did using CustomCreationTool.
Thanks Smile
Previous Topic:Grouping Nodes on the canvas
Next Topic:Code generation error for node without domain element
Goto Forum:
  


Current Time: Fri Nov 07 14:50:16 EST 2025

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

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

Back to the top