Is it possible in the new version of Acceleo (3.xx) to use more than one metamodel in a generation template/module? It would be great if you can provide some information on how to do this.
This is a multi-part message in MIME format.
--------------030008010906020608050507
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Hi Mehrdad,
And nope, this wasn't possible with the Acceleo 2.* stream and has been
added for 3.*.
Laurent Goubet
Obeo
On 02/02/2011 14:13, Mehrdad Saadatmand wrote:
> Thanks!
>
> was this feature to use multiple metamodels also possible in acceleo 2.x?
>
>
I have a related problem. My mtl file recognizes my two metamodels but after running the file I do not get the correct result because it seems that the generator can only access the instantiation of my first metamodel and not the instantiation of my second metamodel.
Put differently: Is it possible two add 2 models as input files which contain references to each other.
Stephane Begaudeau Messages: 370 Registered: April 2010 Location: Nantes (France)
Senior Member
Hi,
If you want to use multiple models in your generator, you should start with one of the models and then navigate to elements of the second one in the generator. If the second one is not loaded, you can use the code in the comment in the method "doGenerate" (//org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model)).