Acceleo source generator always replaces target file [message #1821386] |
Wed, 12 February 2020 04:51  |
Eclipse User |
|
|
|
The Acceleo default writer 'AcceleoFileWriter' doesn't handles the case when generated content is equal to the existing file content.
It causes the SCM to save revisions with no changes, or to force programmer to lose time reverting the target file code to the repository code.
EMF source code generator handles it by default, but Acceleo doesn't. It should be easy to include this feature by modifying slightly the 'DefaultStrategy' and 'AcceleoFileWriter' as shown on the attached files.
|
|
|
Re: Acceleo source generator always replaces target file [message #1821400 is a reply to message #1821386] |
Wed, 12 February 2020 10:12  |
Eclipse User |
|
|
|
Hi
Your patches are not patches so it is hard to see what you have changed.
I'm very dubious about your claims since at least for GIT a no-change new file is not 'new'. I therefore suspect that you do have a change, quite possibly a new-line policy, which may indeed require a bug fix to correctly respect project settings (not readily accessible at Acceleo run-time), or just to impose the simpler Unix new-lines always policy. have you tried setting your project preferences to Unix new-lines, UTF-8, and updated all files to this format? Setting the workspace preference to Unix new-lines, UTF-8 may help for you, but may not work unless your colleagues do the same.
Anyway, if you want to encourage the Acceleo developers to respond, you should clone the Acceleo GIT and submit a Gerrit.
Regards
Ed Willink
|
|
|
Powered by
FUDForum. Page generated in 0.04511 seconds