Setting CPP options
You can use the CPP tab in the Editor Options preference page to specify preferences for the Remote C/C++ and z Systems® LPEX editors. When the target environment that includes this set of editor options is the current target environment for a subproject, these settings apply to all of the project files that use the Remote C/C++ and z Systems LPEX editors.
Procedure
To set the CPP options, complete the following steps:
- In the Editor Options preference page, click the CPP tab.
- In the Initial LPEX Commands section, type the editor
command that you want to run each time that the parser opens a file.
Commands are run when a file is opened and when the editor options for an open file change. The editor options for a file change in the following circumstances:
- When the editor options that are used by the file are modified in the Editor Options preference page or the Target Environment subproject properties page.
- When the current target environment changes and the old and new target environments use different sets of editor options.
To use a command that contains a backslash, you must use \\. For example, to set the message text to Initialization \ Customization Completed, type set messageText Initialization \\ Customization Completed . - To add the command to the list of editor commands, click Add.
- Optional: To edit a command in the list of
editor commands, do the following steps:
- From the list of editor commands, select the command
that you want to edit, and then click Edit Command.
The Edit Command window opens.
- Modify the selected editor command, and then click OK.
The modified command is added to the list.
- From the list of editor commands, select the command
that you want to edit, and then click Edit Command.
- Optional: To remove a command from the list
of editor commands, select the command that you want to remove and
click Remove. The selected command is removed from the list of editor commands.
- To change the order of the commands in the editor command
list, select a command that you want to move, and then click Move
Up or Move Down. Note: The commands are run in the order that they are listed.
- In the User Macro F1 Help Files section,
specify a list of the user macro help files that store the help
mapping for user macros. For each user macro help file that you
want to add to the list of user macro help files, do the following
steps:
- Click Add. The Add Help File Location window opens.
- Do one of the following steps:
- Click Use a manually created mapping file. In the Mapping file field, type the name of the local or remote user macro help file that you want to use. You must specify the name with a fully qualified drive letter or UNC path, such as \\HOSTNAME\MyFolder\my_macro_help.hlp. You can also specify the name of this file by using environment variables. Enclose variable names in the % symbol. To browse for the location of the user macro help file that you want to use, click Browse.
- Click Generate index from an existing help table of
contents. In the Plug-in name field,
type the name of the plug-in that contains your custom help. In the TOC
file name field, type the name of the toc.xml file
that you created for your custom macros.Note: The label attribute for each topic in the toc.xml file is used as the keyword and the href attribute is used as the associated help page. If a topic in the toc.xml file has a label attribute, but no href attribute, it is ignored. If there are spaces in the label attribute, it is also ignored and is not indexed. You must specify the labels in the same case that you want to use to search for the keyword because the help is case-sensitive.
- Click OK to close the window.
The location of the help file is added to the list of user macro help files. This list of files is cumulative; each help file in this list is searched when you look for a keyword. If more than one file contains the same keyword, the keyword in the first file is used. For example, if there are two help files in the list, and each file contains a mapping between the keyword char and an associated help page, the association that is contained in the first help file is used. If there are multiple instances of a keyword within the same help file, the last occurrence of the keyword definition in that file is used. For example, if a single help file contains multiple instances of the keyword char, the last occurrence of char in that file is used.
Note: User macro help files can have any file name extension.If you modify the user macro help file and want to reload the file to reflect the changes, complete the following steps:- Right-click to open the menu.
- Select Reload User Macro F1 Help Files.
- Click Add.
-
To specify that you want to add an autocomment to each line that you change when you edit a
file with the Remote C/C++ or z Systems LPEX
editor:
- In the Preferences window, navigate to Autocomment.
- Select Add autocomment to changed lines.
When autocomment is started, it uses the default language profile that is specified on the Autocomment preferences page - In the Base comment field, type
the comment, such as a defect number, that you want to add to each
line. You can use project level substitution variables, including the target environment variables that are contained in the current target environment for the subproject. File level substitution variables are not supported.For example, specify &N to represent the name of a Linux® on z Systems project.Tip: If the base comment is set, but the file does not add a comment to changed lines, the base comment might not meet the criteria that are specified in the profile options. You can use the Autocomment preference page to view or change the autocomment profile options.
- To save your selections in the preference page, click Apply.
The preferences that you selected are applied to all files that use the Remote C/C++ Editor or when you edit C/C++ files in z Systems LPEX Editor.