Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand] How to use local variable in a template
[Xpand] How to use local variable in a template [message #917627] Thu, 20 September 2012 05:06 Go to next message
Eclipse UserFriend
Hello everyone,

There is a need of using local variable in a template (in scope of «DEFINE» ... «ENDDEFINE»).

Could it be using let expression (i.e «let strLst = {} : strLst.add("str") -> ""»)?

My temporary solution is to use globalvar extension from xtend stdlib.

Hope to hear from you soon.

Thanks in advance,

Hai LE
Re: [Xpand] How to use local variable in a template [message #917709 is a reply to message #917627] Thu, 20 September 2012 06:50 Go to previous messageGo to next message
Eclipse UserFriend
Hi what about <<LET ...>><<ENDLET>>

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: [Xpand] How to use local variable in a template [message #918404 is a reply to message #917709] Thu, 20 September 2012 21:49 Go to previous messageGo to next message
Eclipse UserFriend
Hi Christian,

In fact, <<LET>>...<<ENDLET>> just allows the variable evaluated one time at the beginning. We are not able to change the value of variable in block.
Re: [Xpand] How to use local variable in a template [message #918512 is a reply to message #918404] Fri, 21 September 2012 00:39 Go to previous message
Eclipse UserFriend
Could you show an example Of your usecase?

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Previous Topic:[xpand.support.cdt] DefaultCodeFormatterOptions not found
Next Topic:[Xpand] Version in Juno SR1: 1.2.1 or 1.2.2?
Goto Forum:
  


Current Time: Tue Jul 22 22:42:36 EDT 2025

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

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

Back to the top