Managing Preprocessor Blocks
See Also
Preprocessor code blocks enable you to manage preprocessor
directives as you insert them into your code. These
code blocks are marked visually in the Source Editor and are included (or excluded)
when you
build the JAR for a specific project configuration or ability. You can use
these code blocks to create, manage and track code that is specific to one
or more project configurations or abilities.
In the IDE, you can do the following:
To add a preprocessor block to your source code:
- Select and a line or block of code and right-click on it
Then choose from the following:
- Create <nested> If/Else Block. Creates
a conditional If/Else expression for the default configuration or you
can use code completion to choose other configurations.
- Add Elif Block Section. Creates a conditional
#elif
expression
within an IF/Else block.
- Create Debug Block. Determines if the line following
the directive should be commented or uncommented based on the
debug level set in the project properties.
- Use the Editor to enter code within the code blocks.
To change a preprocessor block's association:
- Click to the right of a preprocessor directive (signified by the characters
//#
).
- Type Ctrl-Space and choose a configuration or ability from the code completion
drop-down menu.
- See Also
- About Project Configurations
- About Abilities
-
About Preprocessing
- Working with Project Configurations
About Preprocessor Directives
Legal Notices