Environmental constants are name-value pairs that are visible across the Environment. Using a constant allows you to define the value once, and then refer to it from the various Project configurations, rather than having to redefine the value everywhere it is needed. Selecting the New > Constant option from the Environment context menu, which displays the Create Environmental Constant dialog box shown in the following figure.
Property |
Option |
Description/Usage |
---|---|---|
Name |
Your name for the Environmental constant. |
|
Category |
You may assign a category name, if desired. |
|
Description |
Your description for the constant. |
|
Is a Constant |
Automatically selected, not modifiable. |
|
Value Type |
String |
Allows the string value to be displayed explicitly. |
Password |
Encrypts the value, displaying asterisks (*) in the field. |
|
Value |
The value for the constant. |
When you create an Environmental constant, you assign a permanent value to it which cannot be overridden.
Constants are automatically added to a Constants object group within the Environment, as shown in the following figure. All constants defined for the specific Environment are listed in the Constants section of the panel, along with their various properties. Additional Environmental Constants can be defined using the lower part of the panel.
Icon |
Name |
Function |
---|---|---|
![]() |
Add a New Constant |
Adds a new constant to the list. |
![]() |
Delete a Highlighted Constant |
Deletes the selected constant from the list. |
Refer to the Java CAPS 6 Release Notes regarding this feature.