Is there a way to protect an entire java file with [protected] ? If I wrap it round hte outside of a [file] block then it wipes over the file, If I put it inside it protects the entire file but adds the protected comments.
Is there a way to protect a file without the protected comments?
Unfortunately, this is not possible yet as we were limited by the specification. This needs an update of the MOF Model-to-Text Language specification to support a third generation strategy "once" (or whatever we'd name it) with which we would never generate again a file that already exists. Currently, only "append" or "overwrite" strategies are supported ... and they are through a boolean in the file block signature which prevents us from adding a third choice.
I never got to raise the enhancement request against the specification since the rtf seems to be non-existent (see http://www.omg.org/issues/mtt-rtf.open.html). Though not important in term of code, this change requires a change in the core of Acceleo that can only be done when we get to Acceleo 4.0.