|[Acceleo] Multi-model to text transformation [message #1766268]
||Mon, 19 June 2017 16:40
| Cristina Vicente-Chicote
Registered: April 2017
I am trying to use Acceleo to generate some text from a root.xmi model, defined in terms of a rootMM.ecore meta-model. This metamodel has some dependencies on other meta-models. As a consequence, my root.xmi model needs to load some "external models" in memory when the required attributes/references need to be displayed/modified in the model editor. This means that these "external models" are only loaded in memory on demand... not when the root.xmi model is opened!! I guess this is why I am not being able to generate text from some parts of my root.xmi model, in particular, for the attributes of objects stored in those "external models".
When I try to write one of these attributes I always get "invalid". However, if I manage to load these elements in memory in advance (e.g., using an odd "getter" implemented just for that purpose in the corresponding class of the external meta-model), I get the right value of the attribute.
Do you know how to force the load in memory of all the models required by a given xmi model? I guess this would definitively solve the problem.
Thanks in advance,
Powered by FUDForum
. Page generated in 0.01938 seconds