Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Controlling whitespace in output text
[Acceleo] Controlling whitespace in output text [message #521993] Fri, 19 March 2010 15:01 Go to next message
Marin  rli? is currently offline Marin rli?Friend
Messages: 35
Registered: October 2009
Member
Hi all,

I was wondering if there is a way to control the whitespace (especially line breaks) in generated output?

Output is Java code, so Eclipse formatting does the trick, but it would still be nice to have something a bit neater out of the box Smile

Thanks,
Marin

[Updated on: Fri, 19 March 2010 15:05]

Report message to a moderator

Re: [Acceleo] Controlling whitespace in output text [message #522363 is a reply to message #521993] Mon, 22 March 2010 13:39 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070808000105090301090104
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Marin,

We've worked a lot on indentation and white space handling for the last
Acceleo build (3.0.0M6). Briefly, white space characters (including line
breaks) are generated as they appear in the module file with the
exception of lines on which only appear block heads/tails or comments
(where all whitespaces are ignored). I have a first draft of a document
outlining the text production rules, yet this doc won't make it in the
official documentation before the M7 build of Acceleo.

As for the specific problem of "which line break to generate" (\r\n for
windows, \r on mac, \n on unix), Acceleo doesn't offer any facilities to
define which of the three to use : it takes the system default.

Laurent Goubet
Obeo

Marin Orlić wrote:
> Hi all,
>
> I was wondering if there is a way to control the whitespace (especially
> line breaks) in generated output?
>
> Output is Java code, so Eclipse formatting does the trick, but it would
> still be nice to have something a bit neater out of the box :)
>
> Thanks,
> Marin


--------------070808000105090301090104
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------070808000105090301090104--
Previous Topic:[JET] Implicit objects 'context' and 'out'
Next Topic:Using JET2 to modify existing files
Goto Forum:
  


Current Time: Thu Apr 25 04:24:29 GMT 2024

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

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

Back to the top