Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Protected block indentation problems
[Acceleo] Protected block indentation problems [message #643373] Mon, 06 December 2010 11:50 Go to next message
Eclipse UserFriend
Hopefully without posting an example someone will be familiar with this problem.

I applied "post trim" to each of my templates, but even still, every time I re-generate my code, the protected block code gets progressively further indented.

The only way I was able to prevent this from happening was to delete all of the indentations in my mtl code, making it highly unreadable.

Is there something obvious I'm missing, or might this be an Acceleo bug?

Thanks!
Jeff
Re: [Acceleo] Protected block indentation problems [message #643495 is a reply to message #643373] Tue, 07 December 2010 01:55 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

This is a known bug of Acceleo, we try to correct the indentation after the generation and this should not be applied to the protected area. It should be corrected for Acceleo 3.1.

Stephane Begaudeau, Obeo
Re: [Acceleo] Protected block indentation problems [message #643617 is a reply to message #643495] Tue, 07 December 2010 11:27 Go to previous messageGo to next message
Eclipse UserFriend
In the meantime, is there an easy way to call JDT's source formatting to beautify the generated code?

Thanks!
Jeff
Re: [Acceleo] Protected block indentation problems [message #643755 is a reply to message #643373] Wed, 08 December 2010 02:52 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

The formatter of the JDT is "org.eclipse.jdt.core.formatter.CodeFormatter". You could try something like this:
http://dev.eclipse.org/newslists/news.eclipse.tools.jdt/msg2 4101.html
http://stackoverflow.com/questions/2873678/eclipse-jdt-call- correct-indentation-programmatically

Stephane Begaudeau, Obeo.
Re: [Acceleo] Protected block indentation problems [message #643922 is a reply to message #643755] Wed, 08 December 2010 12:27 Go to previous message
Eclipse UserFriend
Thanks so much Stephane. I'll give it a shot! I couldn't find these in my searches.

Jeff
Previous Topic:How Increment Variable in loop
Next Topic:How to call JDT source formatting (beautify) after generation
Goto Forum:
  


Current Time: Wed Jul 23 07:53:56 EDT 2025

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

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

Back to the top