Creating and Associating an Ability with a Configuration


To create and associate an ability with a configuration:

  1. Right-click your project in the Projects window and choose Properties to open the Project Properties dialog box.

  2. Select the Abilities panel.

  3. From the Project Configuration drop-down box, select the configuration you would like to associate with the new ability.

  4. Uncheck the Use Values from "DefaultConfiguration" checkbox (if you did not select DefaultConfiguration in the previous step).

  5. Click the Add button to bring up the Add Ability dialog box, shown in Figure 14-7.

    Figure 14-7. Add Ability dialog box

  6. If the ability you wish to associate with the configuration is not in the Abilities list, simply write your own identifying name in the text field, add a value if necessary, and click OK to add the ability. Otherwise, you can use one of the predefined abilities.

  7. The newly created ability is listed and selected in the Abilities panel of the Project Properties dialog. If you are done adding abilities to the device configurations, click OK to close the Project Properties dialog box.

Once an ability is associated with at least one configuration in the project, that ability will appear in the code completion popups when you edit preprocessor blocks in the editor as shown in Figure 14-8. The preprocessor code completion is invoked in two regimes, either for directives following the //# token or for abilities following a directive statement.

Figure 14-8. Ability code completion


The list of abilities contained in the Abilities List view of the Add Ability dialog box contains all the abilities that are attached to configurations in any project that the IDE is currently aware of. The IDE is aware of more projects than those that are open, so don't be surprised if you see some abilities there that don't belong to any open project.

There is no Remove Ability button in the Add Ability dialog box, because it simply displays all abilities that are associated with any configuration.




NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 279

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net