Unsetting stereotype optional properties [message #1720735] |
Wed, 20 January 2016 10:03  |
Eclipse User |
|
|
|
Hello
I have defined stereotype in a profile with one optional integer attribute (I defined the property using the UML standard primitive integer type, and multiplicity 0..1).
Afterwards, I can apply my profile to the model, and the stereotype to an element. In the property view, in the profile panel, I can edit the property of the stereotype.
However, once I have set a value, there is no way to unset the property, I must enter an integer in the form.
Is there any way in the property view GUI to unset the property ?
The ecore editor has a button "restore default value" in the properties view header, that seems to allow this, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=222754
Another doubt, not sure if it is a Payrus or an UML2 issue :
I have checked the generated ecore, after defining the profile, and the property was converted to an EAttribute of type Integer (an EDatatype defined in the UML model library http://www.eclipse.org/uml2/5.0.0/Types#//Integer) with lower bound 0 and upper bound 1.
Why is it not converted to an unsettable attribute, to be able to distinguish the case of unset versus set to to default value ( 0 in the case of integers) ?
|
|
|
|
Re: Unsetting stereotype optional properties [message #1721004 is a reply to message #1720812] |
Fri, 22 January 2016 08:29  |
Eclipse User |
|
|
|
Hello
Quote:If you want to generate more accurate Ecore definitions, you should use the Ecore profile
Ok, fair enough.
Quote:However, this won't be sufficient, as Papyrus doesn't implement the "unset" action for primitive type editors
but then, it remains the question of whether there is some special treatment in the primitive type editors to handle attributes with multiplicity 0..1 ? or is it handled just like a multiplicity 1..1
|
|
|
Powered by
FUDForum. Page generated in 0.03264 seconds