|
Re: [Acceleo] Howto process the output before it is saved to a file [message #666754 is a reply to message #666745] |
Fri, 22 April 2011 07:58  |
|
Hi Martin,
In order to manipulate the generated output before the moment we save it in a file, you have two solutions:
1- You can change the strategy used for the generation from a default strategy to a preview strategy. With the preview strategy we won't generate the file, we will just return a map containing the generated content of each file. You can then manipulate those String and then you can write them in a file. You can change the generation strategy from the generated Java launcher. Then, the method generate will return the map containing the result of the generation.
2- You can also create a custom strategy, have a look at org.eclipse.acceleo.engine.generation.strategy.IAcceleoGener ationStrategy and org.eclipse.acceleo.engine.generation.strategy.DefaultStrate gy for more information. Strategies are used to determined what should be done with the generated content.
Stephane Begaudeau, Obeo
--
Twitter: @sbegaudeau
Acceleo wiki: http://wiki.eclipse.org/Acceleo
Blogs: http://stephanebegaudeau.tumblr.com & http://sbegaudeau.tumblr.com
|
|
|
Powered by
FUDForum. Page generated in 0.02140 seconds