| Summary: | UML2Ecore Converter should make derived features transient | ||
|---|---|---|---|
| Product: | [Modeling] MDT.UML2 | Reporter: | Lutz Wrage <lw> |
| Component: | Core | Assignee: | Kenn Hussey <Kenn.Hussey> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Kenn.Hussey |
| Version: | 2.2.0 | Keywords: | plan |
| Target Milestone: | M4 | Flags: | Kenn.Hussey:
juno+
|
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | Community Support | ||
|
Description
Lutz Wrage
The message is misleading and needs to be changed. The converter used to make all derived properties transient, but this behavior was changed some time ago (in a previous release) since it cannot always be assumed that derived properties are transient. I guess the way to make properties transient is to use the ecore profile. Then the diagnostic messages _UI_UML2EcoreConverter_ProcessDerivedFeature_diagnostic and _UI_UML2EcoreConverter_ReportDerivedFeature_diagnostic should be changed because they led me to believe that the code is wrong. The question remains why the converter sets containment to false for derived features. Again, if this is the intended behavior, the diagnostic messages should reflect this. Yes, the messages will be changed during the next release. It's generally not a good idea for derived features to be containment, because of some of the assumptions in EMF; for example, the copier and cross referencer both ignore derived features. However, in connection with feature maps, EMF needs derived containment features. This is what I am trying to do. My workaround is to set volatile and transient using the ecore profile and to turn off processing of derived features. Ah, I suppose we could change the logic to that feature map features aren't processed... in any case, that work around makes sense (and gives you greater control). Since it's more likely that derived properties are transient than not, we should probably change the behaviour so that this is the rule and use the Ecore profile to mark properties which should not be transient. The changes have been committed to git. |