|
|
|
Re: [Acceleo] How to load two models as input for generation? [message #1009499 is a reply to message #1008705] |
Fri, 15 February 2013 08:33 |
|
Hi André,
What this basically means is that you do not "need" to load the two models if there are links between the two : the references will be loaded automatically as you navigate your models. For example if you have a two models "library.ecore" and "types.ecore"; library.ecore contains a class "Book", types.ecore contains a class "CirculatingItem". If the super-type of class "Book" is "CirculatingItem", then there is a "natural" link between your two models. You only need to load "library.ecore" and feed it to Acceleo : references will be automatically resolved when you try to access [book.eSuperTypes/] from Acceleo.
If you want to be absolutely sure that all your models are loaded when you generate, without relying on lazy loading, you can use the proposed code, calling "EcoreUtil.resolveAll(...)" before starting the generation.
Laurent Goubet
Obeo
|
|
|
Powered by
FUDForum. Page generated in 0.02994 seconds