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

Bug 320381

Summary: [UML->ecore] Transient and unsettable attribute of generated ecore model are not set correctly
Product: [Modeling] MDT.UML2 Reporter: Ansgar Radermacher <ansgar.radermacher>
Component: CoreAssignee: UML2 Inbox <mdt-uml2-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: Kenn.Hussey
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Ansgar Radermacher CLA 2010-07-20 08:26:29 EDT
Build Identifier: 

The ecore attributes transient and unsettable of ecore models generated from UML are set to false, although the corresponding attributes of the EAttribute stereotype are true (at least in case of an UML property)


Reproducible: Always

Steps to Reproduce:
1. Create a property (attribute) within a class of a UML model.
2. Stereotype the attribute with the EAttribute value. Tag the attribute as volatile, unsettable and transient.
3. Run the UML to ecore generator.
3. Inspect the generated ecore model. The attribute is shown as volatile, but not as unsettable and transient.
Comment 1 Dave Steinberg CLA 2010-07-20 08:57:38 EDT
The model importer for UML is provided by the UML project, not EMF.
Comment 2 Kenn Hussey CLA 2010-07-20 09:13:42 EDT
(In reply to comment #0)
> The ecore attributes transient and unsettable of ecore models generated from
> UML are set to false, although the corresponding attributes of the EAttribute
> stereotype are true (at least in case of an UML property)

Have you turned on the converter option to process Ecore stereotypes?
Comment 3 Ansgar Radermacher CLA 2010-07-20 09:23:38 EDT
(In reply to comment #2)
> (In reply to comment #0)
> > The ecore attributes transient and unsettable of ecore models generated from
> > UML are set to false, although the corresponding attributes of the EAttribute
> > stereotype are true (at least in case of an UML property)
> 
> Have you turned on the converter option to process Ecore stereotypes?

Yes, I guess you mean "Ecore tagged values" => process
(In fact, I process all options, except Camel case names - I'd prefer that these would be set to "ignore" by default, but that's another issue).
Comment 4 Ansgar Radermacher CLA 2010-07-26 12:11:11 EDT
I found the problem myself: I had to apply the EReference instead of the EAttribute stereotype. I understood that EReference should be used for associations, but  since the attribute in question has "*" cardinality it is apparently considered as one.
However, I suggest to have a warning during the transformation if the improper stereotype is applied and ignored in Turn. Additionally, I'd like to have a clearer documentation (maybe I did not dig long enough, though...)