How to create an Acceleo 2.x generator for composed metamodels

Posted on in Blog
Imagine you have a metamodel that reference other metamodels and you want to create a generator for this metamodel. Let's take an example :

The first metamodel contains an EClass named Object that have a reference package of type EPackage. That create a reference to the ECore metamodel.

First we have to create a template for the first metamodel :




Object :



Then we need to create the template manymetamodels.ecore.mt :




EPackage .


And that's all. So you just need to create at least one template per metamodel and then inport them according to the way you navigate your metamodels.
Auteur d'origine: yvan