Rational Developer for System z

Preprocessor statements in the editor

The editor provides several features to help identify and verify preprocessor statements.

Preprocessor statements are customized language statements supported by your environment to extend or simplify creating code. These statements are transformed into programming language statements before the program is compiled. Using editor preferences and toolbar tasks these statements can be supported by editor tools.

The Preprocessor Integration preferences trigger running the preprocessor during editing to verify the expected output from the preprocessor statement. The preprocessor output file contains the programming language statements generated from the preprocessor statements. The location of the output file is dependent on whether the preprocessor is local or remote.

For a local preprocessor, the output file is defined by the Preprocessor Output File Name option on the property group and is located in the BuildOutput folder of the local project. The output file for a remote preprocessor is defined by the Preprocessor Output Location property on the Editor Configuration page.

The preprocessor output is used to provide editor functions, such as hover help and content assist with the following limitations:

Editor tool functions such as syntax errors apply only to the preprocessor generated output in the file.

Invocation of the preprocessor can occur automatically when the file is opened or saved as defined by the Preprocessor Integration preference. It can also be manually invoked using the Source menu in the editor.

The Preprocessor Integration preference also provides settings that impact how preprocessor statements are identified by the editor. These settings help to distinguish preprocessor statements from comments or non-syntax text that is not a preprocessor statement.

The Source menu in the editor provides the following actions for identifying preprocessor statements.
Identify using configured Preprocessors
Compare statements in the program with the specified preprocessor. Statements that match statements in the preprocessor are marked as preprocessor statements.
Identify Using Specific Output File
Compare statements in the program with an identified output file from a previous invocation of the preprocessor. Statements that match the output file are marked as preprocessor statements.
Use the Clear Identifications menu item to remove marks identifying a preprocessor statement.
Other action items, provide for accessing preprocessor preferences and configuring preprocessors.
Configure Preprocessors
Provides access to the property group where you can configure the mechanism used to invoke the preprocessor and retrieve the preprocessor output file. The property group editor opens to the appropriate Editor Configuration page for the type of preprocessor being used.
Preferences
Access the Preprocessor Integration preference.

Feedback