When the autocomment feature is invoked, each line that
is changed in a file is passed to the autocomment feature for processing.
If the changed line meets user-defined criteria, an autocomment is
inserted into the line.
To invoke the autocomment feature, complete the following
steps:
- Open the file that you want to work with in the editor.
- In the editor, right-click to open the pop-up menu.
- Select Start Changing Flagged Lines to
open the Change Flag Insertion dialog box.
- In the Base Flag field, type the
base portion of the autocomment that you want to use.
Tip: Project level user variables are supported in autocomment
commands; file level user variables are not supported. For example,
to include the project name in the comment, use
&N
.
The
base comment is appended to the characters that are specified in the
language profile. Comments appear in the file in the following format:
<append start characters><optional padding><base comment><optional padding><append end characters>
For
example, if the base comment is JDoe_04 and the language profile is
set to the default CPP profile, the resulting comment is:
/*JDoe_04*/
The
base comment is validated according to the settings in the language
profile. For example, some language profiles restrict the length of
the comments that you can use. You can modify the settings for a language
profile in the
Autocomment preference page.
- From the Language
Profile drop-down list, select one of the following language
profiles that you want to use:
- HLASM - profile for assembler files
- C - profile for C files
- CPP - profile for C++ files
- BUILD - profile for build script files
- PLI - profile for PL/I files
- ST - profile for SabreTalk files.
- JAVA - profile for Java™ files
- COBOL - profile for COBOL files
- Other - custom profile that you created
- Click OK to save your selections.
A comment appears in the status line to indicate that the
autocomment feature is started. For example:AutoComment ON - Profile:CPP Comment:/*JDoe_04*/.
If
the autocomment feature cannot be started, a message indicating the
cause is displayed.