Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Two input models for Henshin transformation

Hi Yannic,
 
you can have as many input models as you want. Just use EGraph.addTree(x) or EGraph.addGraph(x) to add more models. The former will add x and all its contained children to the graph, the latter will add not only all children, but even all referenced objects. If your transformation matches elements which are not directly contained in your input model, you need to use addGraph(), otherwise you are fine with addTree().

By the way, the constructor EGraphImpl(Resource) invokes addGraph() on all root elements of the resource.

If you have only a single model / resource, you can also use InterpreterUtil.applyToResource() which will automatically take care of adding / removing root elements to the resource.

Cheers,
Christian




2013/6/12 Yannic Noller <nolleryc@xxxxxxxxx>
Hi all,

is there any to way to have two input models for a transformation? If not, do you have any idea how to merge two meta models?

Cheers,
Yannic

_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev



Back to the top