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

Bug 342009

Summary: [Properties View] No possibility to set a default value of a property by an enumeration literal
Product: [Modeling] Papyrus Reporter: saadia dhouib <dhouib>
Component: CoreAssignee: Camille Letavernier <cletavernier>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: rschnekenburger
Version: 0.7.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description saadia dhouib CLA 2011-04-06 08:26:56 EDT
Steps to reproduce:
1. create an enumeration 
2. create two enumeration literals inside this enumeration: toto and titi
3. create a class
4. create a property inside this class and type it by the enumeration
5. go to the properties view and try to set the the default value of the property by toto
The enumeration literals toto and titi are not proposed in the list of possible default values
Comment 1 Camille Letavernier CLA 2011-09-23 08:10:14 EDT
This has been fixed with the new property view framework (0.8.0 or 0.8.1, I'm not sure).

However, because of Bug 294758, this might not be really intuitive (The property's type is never taken into account) :

Steps:

5. create a new "InstanceValue" for the default value
6. type it with your property type (The Enumeration)
7. choose your literal for the "Instance" attribute

(Typing the InstanceValue is not necessary, but it filters the values available in the "Instance" property)