This topic describes common tasks you can perform to create a Java ME MIDP
project configuration. For more detailed information, click the links in the
right column.
To perform this task |
Follow these steps |
Create a project configuration |
- Right-click on a project in the Projects view and choose Properties.
- Choose Add Configuration from the Project Configuration dropdown menu.
- Enter a name in the New Configuration Name field.
- Click OK.
|
Create a project configuration template |
- Right-click on a project in the Projects view and choose Properties.
- Click Manage Configurations.
- In the Project Configuration Manager, select a configuration and click
the Save as Template button.
- In the Save Project as Configuration Template dialog, enter a name
for the template.
- Click Save.
|
Use a template to create a new project configuration |
- Right-click on a project in the Projects view and choose Properties.
- Choose Add Configuration from the Project Configuration dropdown menu.
- Select a template from the Use Configuration template dropdown menu.
- Optionally, modify the name of the configuration in the New Configuration
Name field.
- Click OK.
|
Customize a configuration |
- Right-click on a project in the Projects view and choose Properties.
- Choose a property page from the Category menu page.
- Uncheck the Use Values from "DefaultConfiguration".
- Modify the properties as desired.
|
Set the active configuration |
- Right-click on a project in the Projects view and choose Set Active Project
Configuration.
You can also change the configuration using the Configuration drop-down menu in the Toolbar.
|
Create an ability and associate a configuration |
- Right-click on a project in the Files view and choose Properties .
- Choose the Abilities page from the Category menu tree.
- Click the Add Ability button.
This opens the Add Ability dialog.
- In the Add Ability dialog, enter a name for the ability.
Optionally, add a value for the ability.
- Click Ok to close the Add Ability dialog.
The ability is now associated with the selected project configuration.
|
Associate an ability with a configuration. |
- Right-click on a project in the Files view and choose Properties .
- Choose the Abilities page from the Category menu tree.
- Choose a configuration from the Project Configuration dropdown menu.
This is the configuration with which the ability will be associated.
- If necessary, uncheck the Use Values from "DefaultConfiguration" checkbox.
- Click the Add Ability button.
This opens the Add Ability dialog.
- Choose an ability from the list. Click OK.
|
Add a preprocessor block to your code. |
- Place the cursor in the Source Editor, or select a line or block of
code.
- Choose Edit > Preprocessor Blocks.
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.
|