| Summary: | Template isn't called from UI Launcher in case of dynamic models | ||
|---|---|---|---|
| Product: | [Modeling] Acceleo | Reporter: | Templier Thierry <templth> |
| Component: | Core | Assignee: | Project Inbox <acceleo-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | laurent.goubet, stephane.begaudeau, templth |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
Thanks for bringing the issue here Thierry, this will make a great reminder that we need to look into generation on dynamic models. You're welcome, Laurent! Don't hesitate to tell me if you want me to make some tests with my code... Thierry The major problem with dynamic metamodel has been fixed and the Acceleo documentation of the generated Java launcher has been updated accordingly. You have to register the path of your metamodel as its uri and it will work in Acceleo 3.1.0 starting with Acceleo 3.1 M7 next month. |
Build Identifier: 20100617-1415 All plugins (metamodel, generator and ui launcher) are defined within the same workspace. My template references the metamodel using the ecore file as following: [module generate('platform:resource/[metamodel.plugin]/model/metamodel.ecore')/] My template works fine since I can generate code through Run Configurations with an Acceleo Application within the same workspace. However, after having started a new eclipse instance (Eclipse Application from the Run Configurations), the template isn't called from UI Launcher. It seems to be caused by dynamic models. After having debugging processing, there is no match between the argumentType (input of template) and elements of model. while (targetElements.hasNext()) { final EObject potentialTarget = targetElements.next(); if (argumentType.isInstance(potentialTarget)) { <------- (...) } } The argumentType instance in my case is not null, of type EClass but all its fields are null... See exhanges related to this problem in m2t forum: http://www.eclipse.org/forums/index.php?t=tree&goto=553352&S=b7a3cd0775d4971a67dc186d9712b376#page_top Thierry Reproducible: Always