Setting C/C++ parser preferences

You can use the C/C++ Parser preference page to specify preferences for the z Systems® LPEX Editor.

About this task

To set the C/C++ preferences, complete the following steps:

Procedure

  1. In the navigation pane of the Preferences window, double-click the LPEX Editor node to open the tree of available preference pages.
  2. Double-click the z Systems LPEX Editor node to open the tree of available preference pages, and then click C/C++ Parser to open the C/C++ Parser preference page.
  3. In the Initial LPEX Commands section, complete the following steps:
    1. Type the editor command that you want to run each time the C/C++ parser opens a file. For example, if you define a custom color instruction file that you want all files to use, you can add a command called setCustomColoring on to the list of editor commands that are run each time the parser opens a file.
      Commands are run when a file is opened in the C/C++ parser.
    2. Click Add to add the command to the list of editor commands.
    3. Optional. To edit a command in the list of editor commands:
      1. From the list of editor commands, select the command that you want to edit, and then click Edit Command to open the Edit Command dialog box.
      2. Modify the selected editor command, and then click OK to save your changes and close the dialog box. The modified command appears in the list of editor commands.
    4. 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.
    5. 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 to change its position within the list of commands.
      The commands are run in the order that they appear in the editor command list.
      Note: For files in a project, commands that are specified in the C/C++ Parser preference page are run first, followed by any applicable commands set within the C/C++ tab of the Editor Options preference page.
  4. 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, as follows:
    1. Click Add to open the Add Help File Location dialog box.
    2. Do one of the following actions:
      • Click the Use a manually created mapping file radio button. In the Mapping file field, and type the name of the local or remote user macro help file that you want to use. You must specify the name using a fully qualified drive letter or UNC path. For example, \\HOSTNAME\MyFolder\my_macro_help.hlp. You can also specify the name of this file using environment variables. Enclose variable names using the % symbol. To browse for the location of the user macro help file that you want to use, click Browse.
      • Click the Generate index from an existing help table of contents radio button. 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 since the help is case sensitive.
      • Click OK to close the dialog box.

      The location of the help file appears in the list of user macro help files.

    3. Repeat this procedure for each additional user macro help file that you want to add to the list of user macro help files.
    Tip: This list of files is cumulative; each help file contained in this list is searched when looking 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 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:
    1. Right-click to open the pop-up menu.
    2. Select Reload User Macro F1 Help Files.
  5. Select the Add autocomment to changed lines checkbox to specify that you want to add an autocomment to each line that you change while editing a file with the z Systems LPEX Editor. When autocomment is invoked, the default language profile is used. The default language profile is set in the Autocomment page of the Preferences window.
  6. In the Base comment field, type the comment that you want to appear on each line that you change while editing a file with the z Systems LPEX Editor (for example, a defect number). You can use project level substitution variables, including the target environment variables contained in the current target environment for the subproject. File-level substitution variables are not supported.
    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 specified in the profile options. You can use the Autocomment preference page to view or change the autocomment profile options.
  7. Specify the CICS® level that the C/C++ parser should use when tokenizing and providing content assist.
  8. Click Apply to save your selections in the preference page. The preferences that you selected are applied to all files that use the C/C++ parser.