Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo]How to protect user code by signature changes
[Acceleo]How to protect user code by signature changes [message #512228] Thu, 04 February 2010 12:46 Go to next message
Eclipse UserFriend
Originally posted by: koos.waytostay.com

Hi All,

We have been generation classes using the protected functionally for writing
user code in the operation body which works fine.

If we change the operation name or signature of the operation the old
operation including the user code is removed.

How do we specify the old operation not to be removed?



Koos
Re: [Acceleo]How to protect user code by signature changes [message #512449 is a reply to message #512228] Fri, 05 February 2010 08:23 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050101080700030409040601
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi Koos,

Protected code will never be removed through generation, except if :
1) You change the marker of the protected area
2) You've put "@generated" on your class and haven't changed this tag
in-between generations, causing JMerge to remove the old operation

Acceleo generations aren't tied to their target : it doesn't know your
generating code. Method names thus cannot alter the generation process.

However, Eclipse's jdt can alter your code ; for example if you've set
it to automatically remove unused methods.

Laurent Goubet
Obeo

Koos wrote:
> Hi All,
>
> We have been generation classes using the protected functionally for writing
> user code in the operation body which works fine.
>
> If we change the operation name or signature of the operation the old
> operation including the user code is removed.
>
> How do we specify the old operation not to be removed?
>
>
>
> Koos
>
>


--------------050101080700030409040601
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

begin:vcard
fn:Laurent Goubet
n:Goubet;Laurent
org:<a href="http://www.obeo.fr">Obeo</a>
email;internet:laurent.goubet@obeo.fr
url:http://www.obeo.fr
version:2.1
end:vcard


--------------050101080700030409040601--
Previous Topic:[Xpand] Advices not applied
Next Topic:[Accelo]use of @code-explicit
Goto Forum:
  


Current Time: Fri Oct 04 02:50:20 GMT 2024

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

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

Back to the top