Skip to main content


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
Rubén Porras Campo is currently offline Rubén Porras CampoFriend
Messages: 67
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 offline Christian DietrichFriend
Messages: 14665
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


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Iterating over extensions
Next Topic:[acceleo] Utilisation d 'enum
Goto Forum:
  


Current Time: Fri Apr 19 20:02:24 GMT 2024

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

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

Back to the top