Skip to main content



      Home
Home » Archived » Sapphire » Dynamic combobox content generated out of the model
Dynamic combobox content generated out of the model [message #720807] Wed, 31 August 2011 05:24 Go to next message
Eclipse UserFriend
Hi,

That is excellent: http://www.eclipse.org/forums/index.php/t/236688/
Is there anything similar available for custom combobox-widget?

E.g. The "Map-Sample" in sapphire.samples. You can enter new locations and routes. However there aren't any suggestions, when you created a route, which location you can choose. So for example, if you have two locations [Munich], [Shanghai]. A combobox inside the tableViewer opens filled with these options.

Is that possible?
cheers, Muki
Re: Dynamic combobox content generated out of the model [message #720948 is a reply to message #720807] Wed, 31 August 2011 10:30 Go to previous messageGo to next message
Eclipse UserFriend
Currently, our focus is on using the browse button approach to solve "possible values" scenarios, but there is an enhancement request open to provide an optional combo box rendering:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=346189

Also, work is currently in progress to hook-up CTRL+Space style of content proposals to text field property editor. This would work in conjunction with the browse button.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=354199

- Konstantin
Re: Dynamic combobox content generated out of the model [message #722091 is a reply to message #720948] Sun, 04 September 2011 08:00 Go to previous messageGo to next message
Eclipse UserFriend
Hi Muki,

I tried this way,lets take the Ezbug example and we have IBugReport which has ProductStage property, by default Sapphire renders it with a radio buttons, if you want that to be changed to drop-down list you can just add an additional presentation hint "prefer.combo"

So your UI def (.sdef) for the drop-down property will look like ,

.....
<property-editor>
   <property>ProductStage</property>
    <hint>
         <name>prefer.combo</name>
          <value>true</value>
    </hint>
</property-editor>
.....


This will show the drop-down instead of the radio buttons.

PS: I use the latest stream build as I have the source code checked out and i build use from it. So please verify if this hint comes option for you in the "Hints" section of the property editor.

Just thought of suggesting it, please ignore it if this hit doesn't come as option with the version of Sapphire you are using.


~Kamesh

[Updated on: Sun, 04 September 2011 08:02] by Moderator

Re: Dynamic combobox content generated out of the model [message #722101 is a reply to message #722091] Sun, 04 September 2011 08:42 Go to previous messageGo to next message
Eclipse UserFriend
I'll give it a try. Thx Kamesh Smile
Re: Dynamic combobox content generated out of the model [message #722132 is a reply to message #722101] Sun, 04 September 2011 11:39 Go to previous message
Eclipse UserFriend
The prefer.combo hint only works for Value<Enum> properties where the choice is between radio button or drop down list presentation. It does not work for Value<String> properties with PossibleValuesService. That's tracked here:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=346189

[Updated on: Sun, 04 September 2011 11:40] by Moderator

Previous Topic:WIKI Article - Extending Sapphire Wizards
Next Topic:DiagramEditor - Manage nodes and edges separatly
Goto Forum:
  


Current Time: Wed Jul 23 07:22:25 EDT 2025

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

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

Back to the top