Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtend whitespace in templates
Xtend whitespace in templates [message #786866] Mon, 30 January 2012 22:35 Go to next message
Eric Springer is currently offline Eric SpringerFriend
Messages: 5
Registered: January 2012
Junior Member
I originally posted this on SO: stackoverflow.com/questions/9061751/xtend-whitespace-templates but there doesn't seem to be much of an Xtend following, so I'll cross post here.

Reply in either spot, I'll check them both Smile


I'm trying to get an additional level of indentation at the first arrow, but no matter how much I add -- none comes out in the resultant string:

Screenshot: i.stack.imgur.com/1vh0Y.png


Re: Xtend whitespace in templates [message #787172 is a reply to message #786866] Tue, 31 January 2012 08:42 Go to previous messageGo to next message
Meinte Boersma is currently offline Meinte BoersmaFriend
Messages: 434
Registered: July 2009
Location: Leiden, Netherlands
Senior Member
Seems pretty odd. In fact, I wouldn't expect any grey whitespace markings within the 2nd FOR-loop because the expression is (visually) at the same indentation level as the loop itself. Could you post the file somewhere? Maybe there's something wrong with the newlines that confuses Xtend?

Re: Xtend whitespace in templates [message #787187 is a reply to message #786866] Tue, 31 January 2012 08:54 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Eric,

the indentation of the FOR loop is relative to a template control
structure (the if) and the indentation of g.gen is again relative to a
control structure (the for). Both are considered to be present to
improve the template readability.
Please indent the IF itself to achieve the desired behavior.

if («ifex.cond.gen») {
«IF ...»
«FOR ..»
«g.gen»
^^^^^^^^ <- this will become grey in the line above
«ENDFOR»
«ENDIF»
}

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 30.01.12 23:35, schrieb Eric Springer:
> I originally posted this on SO:
> stackoverflow.com/questions/9061751/xtend-whitespace-templates but there
> doesn't seem to be much of an Xtend following, so I'll cross post here.
>
> Reply in either spot, I'll check them both :)
>
>
> I'm trying to get an additional level of indentation at the first arrow,
> but no matter how much I add -- none comes out in the resultant string:
>
> Screenshot: i.stack.imgur.com/1vh0Y.png
>
>
>
Re: Xtend whitespace in templates [message #787219 is a reply to message #787187] Tue, 31 January 2012 09:43 Go to previous message
Eric Springer is currently offline Eric SpringerFriend
Messages: 5
Registered: January 2012
Junior Member
Ah!! Great! Thanks again Sebastian! Worked perfectly
Previous Topic:xtext-proxy on maven.eclipse.org is 'Out of Service'
Next Topic:Generic access for QualifiedName
Goto Forum:
  


Current Time: Thu Apr 18 13:34:28 GMT 2024

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

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

Back to the top