Skip to main content

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: 454
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:MWE2 and xpand outside eclipse
Next Topic:[Acceleo] Ordered unbound choices / EFeatureMapEntry
Goto Forum:

Current Time: Wed Oct 28 21:29:40 GMT 2020

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

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

Back to the top