Page 1 of 1

Exchange Regionmarker for Protected Region in Template

PostPosted: Thu Oct 13, 2011 4:07 pm
by meierd
How is it possible to exchange protected region marker in generated code. For example i want to change:

Code: Select all
// Begin Protected Region [[9bf67edd-f4b7-11e0-9572-37ccf6e34953,Includes]]

// End Protected Region   [[9bf67edd-f4b7-11e0-9572-37ccf6e34953,Includes]]

to:
Code: Select all
# Begin Protected Region [[9bf67edd-f4b7-11e0-9572-37ccf6e34953,Includes]]

# End Protected Region   [[9bf67edd-f4b7-11e0-9572-37ccf6e34953,Includes]]

Re: Exchange Regionmarker for Protected Region in Template

PostPosted: Fri Oct 14, 2011 7:15 am
by Heiko Böttger
Yes, it is. To do this, you have to create an instance of a BuildConfig and register your templates as a TemplateGeneratorTask^using the buildTask-Relation. If you already have a buildconfig in use, you can skip the next paragraph.

The easiest way to do so, is creating the buildconfig with the "File->New->BuildConfig"-Wizard. Make sure you have selected the template project before opening it, allowing the wizard dialog to be preconfigured based selection on your selection.If the wizard is not there, you probably have to switch to the actifsource perspective first. Select all template you want do be used when building with this configuration.

After creating the buildconfig change the protected region comments by setting the commentStartTag and the commandEndTag. In your case both values should be #.

Now you have to apply the buildconfig (if not already done) to your targetfolder. Go to your targetproject, right click and open the properties-dialog. Select the "Target Folders"-tab on the "actifsource" propertypage and change the default entry to your buildconfig. After that step you have to add the actifsource packages containing the instance which are used for that build. These instances are returned when invoking the Build.allXXX-Functions. Close the dialog by pressing "Ok".

Best regards
Heiko Böttger