Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Acceleo source generator always replaces target file (The Acceleo default writer 'AcceleoFileWriter' doesn't handles the case when generated content is equal to the existing file content)
Acceleo source generator always replaces target file [message #1821386] Wed, 12 February 2020 09:51 Go to next message
Camilo Vasquez-pinzon is currently offline Camilo Vasquez-pinzonFriend
Messages: 1
Registered: February 2020
Junior Member
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 15:12 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6934
Registered: July 2009
Senior Member
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
Previous Topic:Error in running Acceleo project
Next Topic:[Acceleo] Order of TemplateParameterSubstitution in TemplateBindings
Goto Forum:
  


Current Time: Tue Dec 01 06:39:12 GMT 2020

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

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

Back to the top