Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [Xtend] template expressions
[Xtend] template expressions [message #1125614] Fri, 04 October 2013 17:57 Go to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
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 20:11 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
hi,

yes it is missing but

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

might be useful as workaround


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [Xtend] template expressions [message #1128780 is a reply to message #1125705] Tue, 08 October 2013 01:56 Go to previous message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
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: Fri Apr 26 06:18:28 GMT 2024

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

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

Back to the top