Skip to main content



      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 10:29 Go to next message
Eclipse UserFriend
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 03:36 Go to previous messageGo to next message
Eclipse UserFriend
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 04:03 Go to previous message
Eclipse UserFriend
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 04:06] by Moderator

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


Current Time: Sun May 11 10:28:21 EDT 2025

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

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

Back to the top