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

Bug 353252

Summary: Support dynamic list of child element types
Product: z_Archived Reporter: Ling Hao <ling.hao>
Component: SapphireAssignee: Konstantin Komissarchik <konstantin>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: konstantin
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Ling Hao CLA 2011-07-27 15:55:58 EDT
In the sapphire-gallery.xml sample, heterogeneous element properties or list properties, I would like to add an @Enablement annotation to IChildElementWithEnum type. Depending on the enablment condition, the "Child element with enum" choice will not appear in heterogeneous element properties and Add -> "Child element with enum" menu option will not be available for the heterogeneous list properties.
Comment 1 Konstantin Komissarchik CLA 2011-07-28 14:17:30 EDT
I think that rather than implementing type enablement, we should look at supporting a dynamic list of possible child element types for element and list properties. 

This would solve this requirement as you would be able to vary the set of possible types based on a criteria and would also enable extensibility where third parties wish to contribute new types to an existing model.
Comment 2 Konstantin Komissarchik CLA 2011-10-12 12:20:41 EDT
This has been implemented for a while now. Somehow the bug hasn't been resolved. See PossibleTypesService in the docs.

Please verify.
Comment 3 Ling Hao CLA 2011-11-28 14:58:37 EST
Verify via sapphire-gallery's custom PossibleTypeService.