5.8.1. CodeComposer:preserve:file

Category

CodeComposer directives

Directive

CodeComposer:preserve:file

Deprecated name

CodeComposer:ignore

Purpose

Instruct CodeComposer to preserve the file in following generation runs.

Arguments

none

Returns

nothing

Exceptions

none

Usage

Add CodeComposer:preserve:file in a comment in line 1 to 4 of a generated file to let CodeComposer preserve the file in following generation runs.

Warning

CodeComposer:preserve:file only works when the directive is in line 1 to 4 of a file.

Example

The following example shows parts of a generated Java class that the CodeComposer will preserve in following generation runs. Given any model CodeComposer will not write this file.

Listing 5.70 Example.java
1// CodeComposer:preserve:file
2public class Example {
3
4}

The following example shows parts of a generated XML file that the CodeComposer will preserve in following generation runs. Given any model CodeComposer will not write this file.

Listing 5.71 logback.xml
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE configuration>
3<configuration scan="true">
4        <!--CodeComposer:preserve:file-->
5
6</configuration>

Note

The CodeComposer console window will show the following:

Skip writing file ‘<filename>’, because first 4 lines contains ‘CodeComposer:preserve:file’