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 10:25 Go to next message
labassim  is currently offline labassim
Messages: 6
Registered: May 2010
Junior Member
Hi,
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 10:33 Go to previous message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6196
Registered: July 2009
Senior Member
Hello,

there two ways to do this:

(1) Adding models to a list

<<DEFINE main FOR List[Object]>>
<<ENDDEFINE>>

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>>
<<ENDDEFINE>>

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

Regards,
Christian



Previous Topic:[Xpand] Adding files to ouput
Next Topic:[XPAND] Dynamic Instance
Goto Forum:
  


Current Time: Wed Aug 20 00:52:30 EDT 2014

Powered by FUDForum. Page generated in 0.01398 seconds