[Acceleo] JMerge tags with standalone generator [message #953647] |
Mon, 22 October 2012 12:18  |
|
Hello,
I'm trying to use "@generated" JMerge tags for a Java generator (running standalone). Unfortunately, even if the @generated annotation are well placed in the generated code, a second generation do not generate anything. Each manual modification performed in the source code between tagged methods is not overwritten. Actually, it seems that the code is no longer generated. This trouble appears with the generator launched standalone. When the generation is launched by an acceleo configuration, problem is gone, annotations work fine.
I take a look toward the DefaultStrategy strategy, but it seems to enable JMerge tag usage.
Is the problem coming from a missing generator argument?
Regards,
Vincent
https://aranega.github.io
|
|
|
Re: [Acceleo] JMerge tags with standalone generator [message #957382 is a reply to message #953647] |
Thu, 25 October 2012 07:24   |
|
After more source reading and execution tracing, I figure out that the two strategies which can be used whithout eclipse cannot manage JMerge tag by themselves (DefaultStrategy and PreviewStrategy). The only one which is able to manage JMerge tag is the AcceleoWorkspaceStrategy, but this strategy prevent Acceleo to be run outside eclipse.
Currently, the only solution I found to manage JMerge tag in an Acceleo transformation running standalone (and outside eclipse, I probably should tell that in my previous messsage) is to create a new Strategy extending the PreviewStrategy (or reproducing the PreviewStrategy) and a new FileWriter that use JMerge.
Is there any other solution?
https://aranega.github.io
|
|
|
Re: [Acceleo] JMerge tags with standalone generator [message #957472 is a reply to message #957382] |
Thu, 25 October 2012 08:47   |
|
Hi Vincent,
Acceleo disables JMerge when outside of Eclipse for two reasons :
- Avoid the dependency towards org.eclipse.emf.codegen for standalone Acceleo applications
- JMerge did not work standalone until recently (bug 308069). IIRC, this has been fixed for Juno (Ed Willink and/or Ed Merks might help here, did not re-read through the bug).
Since this is only possible for Juno and onwards, your solution is the only one that works : the default generation strategy of Acceleo does not allow (does not even call) JMerge when running standalone as Acceleo is compatible down to Eclipse 3.5 (Galileo). However, if you do create such a generation strategy, do not hesitate to raise a bug against Acceleo with it attached, we can add it to the codebase as a fourth "example" along with the Default, workspace and preview strategies.
Laurent Goubet
Obeo
[Updated on: Thu, 25 October 2012 08:49] Report message to a moderator
|
|
|
|
Re: [Acceleo] JMerge tags with standalone generator [message #1766152 is a reply to message #1760850] |
Fri, 16 June 2017 13:57  |
|
Hi Dominique,
Vincent never provided us with the upgraded generation strategy that would call JMerge while in standalone, and it has not been worked on by the Acceleo team. Acceleo has now dropped all support for eclipse Luna and prior, so it should now be possible to include in the main code base if it is indeed a limitation that has been removed by now.
Please keep us informed if you do make progress on this.
Laurent Goubet
Obeo
|
|
|
Powered by
FUDForum. Page generated in 0.02172 seconds