Acceleo : Skip code generationhttps://www.eclipse.org/forums/index.php/mv/msg/261851/755899/#msg_755899
I have two source folders in a target project to generate. One is 'src' and other is 'src-gen'. I generate code in 'src-gen'. Here I wish to skip code generation for if a source file of same name already exists in 'src' source folder under same package. How to put this logic in an Acceleo script, please suggest with an example.

Thanks,
Kunal]]>Kunal Prasad2011-11-10T05:52:04-00:00Re: Acceleo : Skip code generationhttps://www.eclipse.org/forums/index.php/mv/msg/261851/756816/#msg_756816
There is currently no simple way to achieve this. It is a known bug (... though I did not find it on the bugzilla; submitted https://bugs.eclipse.org/bugs/show_bug.cgi?id=363782 for the record).

The only workaround I can think of for now is to encapsulate your "file" block inside of an "if", and make the condition of the "if" a call to a Java service that will return either "true" or "false" depending on whether the file already exists or not.

Or if you are trying this for files that support comments, use protected areas or JMerge to prevent Acceleo from overwriting "protected" regions of the code.