Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [XPAND] Use multiple meta-models inside the same template
[XPAND] Use multiple meta-models inside the same template [message #534870] Thu, 20 May 2010 14:25 Go to next message
labassim  is currently offline labassim Friend
Messages: 6
Registered: May 2010
Junior Member
I'd like to use many meta-models inside an Xpand generation template which i use calling the xpandfacade evaluate method.
I have two problems :
1) How do I use evaluate with multiple meta-models (since there's only one single slot for model) ?
2) What's the correct syntax inside the template for invoking and accessing the two meta-models ?
Thanks in advance.
Re: [XPAND] Use multiple meta-models inside the same template [message #534877 is a reply to message #534870] Thu, 20 May 2010 14:33 Go to previous message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 11973
Registered: July 2009
Senior Member

there two ways to do this:

(1) Adding models to a list

<<DEFINE main FOR List[Object]>>

the disadvantage is that you have to splitup / typecast the list yourself e.g. by using typeselect.

(2) Passing the second model as Parameter

<<DEFINE main(Model2 model2) FOR Model>>

General: what you do within the defines depends on what you want to reach.


Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Previous Topic:[Acceleo] How to generate code from Actions in Activity diagram in control flow order?
Next Topic:[XPAND] Dynamic Instance
Goto Forum:

Current Time: Fri May 25 20:50:45 GMT 2018

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

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

Back to the top