Skip to main content



      Home
Home » Modeling » Graphiti » Adding features dynamically
Adding features dynamically [message #1267239] Sat, 08 March 2014 13:05 Go to next message
Eclipse UserFriend
Hi

Is there a simple way to call the FeatureProvider to populate the toolbox/palette dynamically before starting up the diagram ?

Re: Adding features dynamically [message #1268487 is a reply to message #1267239] Mon, 10 March 2014 11:06 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

you can override getPalette in the Tool Behavior Provider. The default
implementation simply adds tools for all create features to the palette.

Michael
Re: Adding features dynamically [message #1270077 is a reply to message #1268487] Wed, 12 March 2014 09:15 Go to previous messageGo to next message
Eclipse UserFriend
Hi

But the problem is i have to pass a model to the createFeatureProvider to decide what to be included in the diagram toolbox is there any way to instantiate a custom DiagramtypeProvider for a given diagram and set it to the corresponding diagram or editor before starting it up ?
Re: Adding features dynamically [message #1270788 is a reply to message #1270077] Thu, 13 March 2014 09:48 Go to previous messageGo to next message
Eclipse UserFriend
You can pass a DiagramTypeProvider id in the DiagramEditorInput to open an
editor. Does that help in your case?

Michael
Re: Adding features dynamically [message #1271302 is a reply to message #1270788] Fri, 14 March 2014 15:39 Go to previous messageGo to next message
Eclipse UserFriend
Not quite, i still wont be able to pass any parameter to it so the FeatureProvider wont know how to generate the CreateFeatures needed when its called by the DiagramTypeProvider "SetFeatureProvider"

Right now i declare this parameter as a global variable but a possibility to pass a parameter to either the DiagramTypeProvider or FeatureProvider would be much better to understand and maintain

[Updated on: Fri, 14 March 2014 15:42] by Moderator

Re: Adding features dynamically [message #1276264 is a reply to message #1271302] Mon, 24 March 2014 06:09 Go to previous message
Eclipse UserFriend
Yes, but you could have different DiagramTypeProviders, each creating the
right set of features.

Michael
Previous Topic:Professional Support
Next Topic:Dynamic "Refreshing" of Palette on Object Selection
Goto Forum:
  


Current Time: Sun Sep 14 17:41:15 EDT 2025

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

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

Back to the top