Java ME MIDP Project Configuration Tasks: Quick Reference

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
  1. Right-click on a project in the Projects view and choose Properties.
  2. Choose Add Configuration from the Project Configuration dropdown menu.
  3. Enter a name in the New Configuration Name field.
  4. Click OK.
Create a project configuration template
  1. Right-click on a project in the Projects view and choose Properties.
  2. Click Manage Configurations.
  3. In the Project Configuration Manager, select a configuration and click the Save as Template button.
  4. In the Save Project as Configuration Template dialog, enter a name for the template.
  5. Click Save.
Use a template to create a new project configuration
  1. Right-click on a project in the Projects view and choose Properties.
  2. Choose Add Configuration from the Project Configuration dropdown menu.
  3. Select a template from the Use Configuration template dropdown menu.
  4. Optionally, modify the name of the configuration in the New Configuration Name field.
  5. Click OK.

 

Customize a configuration
  1. Right-click on a project in the Projects view and choose Properties.
  2. Choose a property page from the Category menu page.
  3. Uncheck the Use Values from "DefaultConfiguration".
  4. 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
  1. Right-click on a project in the Files view and choose Properties .
  2. Choose the Abilities page from the Category menu tree.
  3. Click the Add Ability button.
    This opens the Add Ability dialog.
  4. In the Add Ability dialog, enter a name for the ability.
    Optionally, add a value for the ability.
  5. Click Ok to close the Add Ability dialog.
    The ability is now associated with the selected project configuration.
Associate an ability with a configuration.
  1. Right-click on a project in the Files view and choose Properties .
  2. Choose the Abilities page from the Category menu tree.
  3. 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.
  4. Click the Add Ability button.
    This opens the Add Ability dialog.
  5. Choose an ability from the list. Click OK.
Add a preprocessor block to your code.
  1. Place the cursor in the Source Editor, or select a line or block of code.
  2. 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.

Legal Notices