Skip to main content



      Home
Home » Modeling » TMF (Xtext) » [Xtend] template expressions
[Xtend] template expressions [message #1125614] Fri, 04 October 2013 13:57 Go to next message
Eclipse UserFriend
It looks like Xtend templates only allow for two expressions now -- IF and FOR. What happened to LET .. AS? Without this expression, I don't think there is a way to have variable assignment within loops? Instead, you'd need to concatenate separate strings, losing some of the benefits of template formatting and clarity.
Re: [Xtend] template expressions [message #1125705 is a reply to message #1125614] Fri, 04 October 2013 16:11 Go to previous messageGo to next message
Eclipse UserFriend
hi,

yes it is missing but

<<val variable = .... ;"">>

might be useful as workaround
Re: [Xtend] template expressions [message #1128780 is a reply to message #1125705] Mon, 07 October 2013 21:56 Go to previous message
Eclipse UserFriend
Thanks Christian, that's a great hint. It actually hadn't occurred to me that I could rely on "side-effects" of prior xtend lines, but of course I can since it all compile immediately to Java code. I'm used to Xpand where that wouldn't really make sense. Viewed in this light, the design of xtend makes perfect sense. The only things that need actual template specific expressions would be for control flow.
Previous Topic:UI "deadlock" due to concurrent XtextDocument/AbstractReadWriteAcces.readOnly locks
Next Topic:New Maven archetype available: Xtext with multi module Tycho
Goto Forum:
  


Current Time: Mon Jun 30 23:18:10 EDT 2025

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

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

Back to the top