Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [ACCELEO] Overwriting existing files?(Can Acceleo be configured to overwrite exsisting files?)
icon5.gif  [ACCELEO] Overwriting existing files? [message #670330] Fri, 13 May 2011 14:29 Go to next message
Harri T. is currently offline Harri T.Friend
Messages: 22
Registered: May 2011
Junior Member

Can Acceleo be configured to overwrite exsisting files? I've tried the UML to Java example of Acceleo 3. It does not rewrite existing Java files.

Harri
Re: [ACCELEO] Overwriting existing files? [message #670911 is a reply to message #670330] Mon, 16 May 2011 07:36 Go to previous messageGo to next message
Valerian Merkling is currently offline Valerian MerklingFriend
Messages: 71
Registered: May 2011
Member
What does it do then ? It generate a new copy of the java file ? send an error ?

Acceleo usually rewrite the file, it will just no remove a old generated file if you have changed the file name in your template.

There is also a [protected /] option to prevent rewriting piece of code.
Re: [ACCELEO] Overwriting existing files? [message #670918 is a reply to message #670911] Mon, 16 May 2011 08:03 Go to previous message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

If you generate a file and then relaunch your generation, the old file will be overwritten. If the old file is not generated anymore, we won't delete it.
If you have a piece of code in a protected area, this code will be protected from the overwriting. The same apply for a piece of code with a JMerge tag (like @generated NOT) in the documentation if you are generating Java.
If you have deleted from your generator the protected, the code inside of the protected area of a previously generated file that would be overwritten will be saved in a ".lost" file.

You can see part of this behavior in the video n°8 starting at 7min28s here.

Stephane Begaudeau, Obeo
--
Twitter: @sbegaudeau
Acceleo wiki: http://wiki.eclipse.org/Acceleo
Blogs: http://stephanebegaudeau.tumblr.com & http://sbegaudeau.tumblr.com

[Updated on: Mon, 16 May 2011 08:06]

Report message to a moderator

Previous Topic:[ACCELEO] new metamodel
Next Topic:Acceleo Remove Annotation Error
Goto Forum:
  


Current Time: Fri Apr 26 00:24:59 GMT 2024

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

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

Back to the top