Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [xpand] fixed indentation
[xpand] fixed indentation [message #541467] Mon, 21 June 2010 09:43 Go to next message
Ruben  is currently offline Ruben Friend
Messages: 40
Registered: July 2009
Member
Is there any way to say to XPAND2, that I want a text to be located at at least column number NN?

I would like to have some basic indentation for variable assignment. At the moment I use a self-written function that takes the column number up to the inserted text, the inserted text, and the desired column. Like this:

«FOREACH this.getParameters() AS p-»
    «p.getName()»«spacesToPos(4, f.getName(), 21)» = «f.getValue()»); 
«ENDFOREACH-»

But this solution is not very good, I would like a solution that doesn't need the programmer to count spaces and provide the text two times. Something like

«FOREACH this.getParameters() AS p-»
    «p.getName()»«spacesToPos(21)» = «f.getValue()»); 
«ENDFOREACH-»


Is this possible?
Re: [xpand] fixed indentation [message #545583 is a reply to message #541467] Thu, 08 July 2010 10:23 Go to previous message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 6499
Registered: July 2009
Senior Member
hi,

i guess this is something one / i would rather do in a postprocessor especially cause this is a very seldom usecase.

Regards
Christian
Previous Topic:Iterating over extensions
Next Topic:[acceleo] Utilisation d 'enum
Goto Forum:
  


Current Time: Wed Nov 26 15:34:28 GMT 2014

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

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