| Summary: | Explicit platform:/resource occluded by plugin resource | ||
|---|---|---|---|
| Product: | [Modeling] Acceleo | Reporter: | Ed Willink <ed> |
| Component: | Core | Assignee: | Project Inbox <acceleo-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | CC: | ansgar.radermacher, cedric.brun, sbouchet, stephane.begaudeau |
| Version: | 3.0.0 | ||
| Target Milestone: | RC1 | ||
| Hardware: | PC | ||
| OS: | Windows Vista | ||
| Whiteboard: | |||
|
Description
Ed Willink
I have a similar problem using Acceleo 3.4.1. An MTL file references a UML profile with a valid registered URI pointing to a platform:/plugin resource. However, if the plugin defining the (static) profile is present in the workspace, the EMTL resource loader somehow transforms this URI into a platform:/resource URI. This implies that the ecore associated with profile is added to the Acceleo resource set and loaded a second time. The consequence is that eClass references within the model and those passed by Acceleo are not identical Java instances although its the same thing. This in turn implies that many functions related to stereotypes do not work correctly. The problem does not appear, when the EMTL file referencing the profile is loaded by means of a plugin:/plugin reference. It also goes away, if the plugin that contains the profile definition is closed. Whereas the behavior I described above is somewhat linked to the one Ed described originally, I effectively wanted to add it to bug 351137. Sorry about that. Our tests did not reproduce the issue described here and on top of that the use of "platform:/resource" or "platform:/plugin" in an Acceleo module to reference a metamodel is deprecated and it won't be supported anymore. Only the use of the NsURI will be supported. I don't know how platform:/resource can be deprecOted. It is what I normally use in a variety of applications to ensure that I use the workspace rather than installed model. The Acceleo module is not the place where the details of the location of the elements used by the compilation context should be specified. In the Acceleo module, the user should only defines what's needing for the compilation (I need the metamodel X) but not define where this metamodel should come from. (In reply to Stephane Begaudeau from comment #5) > In the Acceleo > module, the user should only defines what's needing for the compilation (I > need the metamodel X) but not define where this metamodel should come from. That's a valid interpretation of the spec but then you need the approach taken by QVTo that support a project preference page that maps virtual namespace URIs to physical ones. Attempting to discover the mapping automatically is very costly and can give undesired results. |