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
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 14:33 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14669
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





Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:[Xpand] Adding files to ouput
Next Topic:[XPAND] Dynamic Instance
Goto Forum:
  


Current Time: Fri Apr 26 19:58:16 GMT 2024

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

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

Back to the top