Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 346189

Summary: Option to present property with a possible values constraint via a pop-up list field
Product: z_Archived Reporter: Naga <naga_cit>
Component: SapphireAssignee: Konstantin Komissarchik <konstantin>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: carlin.rogers, konstantin, marcelo.paternostro, rodedb
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Naga CLA 2011-05-18 03:14:46 EDT
Currently dynamic contents for list of values is supported through 'Browse' button. Its helpful in cases of huge list. But not so good at usability side for combo box UI.

It would be very helpful to add @Service to enum contents as well.
Comment 1 Konstantin Komissarchik CLA 2011-05-18 12:18:03 EDT
To clarify, this is a request to present properties with a PossibleValuesService via a combo box. Correct?
Comment 2 Naga CLA 2011-05-20 02:23:17 EDT
Thats correct.
Comment 3 Konstantin Komissarchik CLA 2012-03-29 12:40:55 EDT
This enhancement is implemented for stand-alone property editors. The remaining task is to implement it for table cell editors.
Comment 4 Roded Bahat CLA 2012-04-01 04:15:11 EDT
Nice feature.
Is it possible to refresh the values list from within a PossibleValuesService and have the combo display the new values (without navigation to a different editor page and back)?
context(IModelElement.class).refresh() doesn't seem to do it.
Comment 5 Konstantin Komissarchik CLA 2012-04-02 11:15:43 EDT
> Is it possible to refresh the values list from within a PossibleValuesService
> and have the combo display the new values (without navigation to a different
> editor page and back)?

Sure. In PossibleValuesService, register a listener on whatever condition causes the need for a refresh in the init method (remove the listener in the dispose method). Then inside your listener implementation, call "broadcast()" to cause an event to be issued by your PossibleValuesService implementation. The combo box presentation listens for this event and will refresh the list of items.
Comment 6 Roded Bahat CLA 2012-04-03 12:20:51 EDT
Cool, thanks!
Comment 7 Konstantin Komissarchik CLA 2012-04-05 15:50:05 EDT
This enhancement is now fully implemented. Both writable and strict. Both stand-alone and in a table. See gallery sample and enhancements doc.

Please verify. Not that the terminology has changed from "combo" to "pop-up list field" to get away from legacy roots of the combo box term. This affects the style names used in the previous iteration of this feature.
Comment 8 Carlin Rogers CLA 2012-05-12 13:02:29 EDT
Verified 0.5.0.201205111346. Thanks.
Comment 9 Konstantin Komissarchik CLA 2012-05-17 14:13:27 EDT
Closing.