Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo]Using 2 metamodels in combination with 2 separate model instances
[Acceleo]Using 2 metamodels in combination with 2 separate model instances [message #932663] Thu, 04 October 2012 09:59 Go to next message
Frederik Gailly is currently offline Frederik GaillyFriend
Messages: 5
Registered: October 2012
Junior Member

MM 1: ER metamodel
MM 2: Policy metamodel wich refers to metamodel1 and uses metaconcepts that are defined in MM1

Model1 ( instantiation of MM 1 which is created using an EMF generated editor
Model 2 (model2.policy): instantiation of MM2 which contains a reference to Model 1 and uses concepts defined in model 1

I can define an mtl generation file using Acceleo which contains no syntax errors. However when I run this file there seems to be something wrong when I want to use the references in model2 to elements in model1. Seems like model2 cannot find model1.

Thanks in advance,

[Updated on: Thu, 04 October 2012 13:16]

Report message to a moderator

Re: [Acceleo]Using 2 metamodels in combination with 2 separate model instances [message #938860 is a reply to message #932663] Wed, 10 October 2012 08:13 Go to previous message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 450
Registered: April 2010
Location: Nantes (France)
Senior Member


It seems odd, well you can force the loading of all the related resources by using the commented line (//org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model)) in the method "doGenerate" of your java launcher. You can look in the resource set of your model to check that both models are properly loaded (model.eResource().getResourceSet().getResources()).


Stephane Begaudeau, Obeo

Twitter: @sbegaudeau & @acceleo
Google+: stephane.begaudeau & acceleo
Acceleo Documentation:

Previous Topic:[XPand] Apply oaw to xpand project error
Next Topic:Problems running org.eclipse.acceleo:maven:3.2.1 in maven
Goto Forum:

Current Time: Sat Apr 21 06:19:24 GMT 2018

Powered by FUDForum. Page generated in 0.01408 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software