Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Avoid the new line character when a template is called
[Acceleo] Avoid the new line character when a template is called [message #1769562] Tue, 01 August 2017 15:56 Go to next message
Mad Vin is currently offline Mad VinFriend
Messages: 37
Registered: September 2013
Member
Hi !

What is the best way to avoid the new line character when a template is called, if i don't want to call another template just on its right ?

I've found the following ones :

[if calledTemplate().size() > 0]
[calledTemplate()/][/if]
[anotherCalledTemplate()/]


[if true]
[calledTemplate()/][/if]
[anotherCalledTemplate()/]


Is there another solution more... beautiful ?

Thanks.

Regards.
Re: [Acceleo] Avoid the new line character when a template is called [message #1769864 is a reply to message #1769562] Fri, 04 August 2017 09:50 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1857
Registered: July 2009
Senior Member
Hi,

The carriage return you see is the one you have in the module, so there is not much to be done

[calledTemplate()/] // here is a carriage return that will be generated whatever happens
[anotherCalledTemplate()/]


Acceleo 3 doesn't have a "text generation" statement, what's generated is the text of the module itself, with some generation rules applied.

You can use the workarounds you've outline here, or you could use a text formatter post-generation... that's basically the options with the current Acceleo versions.

Laurent Goubet
Obeo
Re: [Acceleo] Avoid the new line character when a template is called [message #1769885 is a reply to message #1769864] Fri, 04 August 2017 13:56 Go to previous message
Mad Vin is currently offline Mad VinFriend
Messages: 37
Registered: September 2013
Member
Ok, thanks for your answer.

Regards.
Previous Topic:[Acceleo] Multi-model to text transformation
Next Topic:Acceleo language
Goto Forum:
  


Current Time: Sat Jul 21 23:15:48 GMT 2018

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

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

Back to the top