Specifying the Properties

The Eclipse function package provides comprehensive support for the properties of an Eclipse resource. The properties are available to you as linked properties. To add a linked property to the model right-click the Properties category folder, and then click New Child > Eclipse > Resource Properties and choose one of the resources available. In this tutorial you only need to add the resource properties Name and Has Children:

  1. Right-click the Properties category folder, and then click New Child > Eclipse > Resource Properties > Name .

    This opens the Enter Object ID dialog box.

  2. In the New ID file, type TUTORIAL_PROP_EclipseResName.
  3. Click OK.
  4. Right-click the Properties category folder, and then click New Child > Eclipse > Resource Properties > Has Children .

    This opens the Enter Object ID dialog box.

  5. In the New ID filed, type TUTORIAL_PROP_ResHasChildren.
  6. Click OK.
  7. While pressing Ctrl, click TUTORIAL_PROP_EclipseResName and TUTORIAL_PROP_ResHasChildren
  8. Drag and drop the selection onto TUTORIAL_ELE_EclipseProject.

    This opens the Create Relationships dialog box.


    Create Relationships
  9. Click OK.
  10. Repeat steps 7 through 9 twice, replacing the target of the drag and drop action with TUTORIAL_ELE_EclipseFolder on the first occasion and TUTORIAL_ELE_EclipseFile on the second.
  11. You now need to create three more properties:

    Right-click the Properties category folder, and then click New Child > Properties .

    This opens the Enter Object ID dialog box.

  12. In the New ID field, type TUTORIAL_PROP_ProjectNature.
  13. Click OK.
  14. Create two more properties, repeat steps 11 through 13 replacing the New ID filed with the following names:
    • TUTORIAL_PROP_ResourceFilter
    • TUTORIAL_PROP_NewName
    Note: All three properties are of type String.

    For each of the properties you have just created specify a meaningful Label value. During runtime the Label value is used, for example, as a title in the Table Results view or as a label in an AWM dialog box. For example:

    Property Label
    TUTORIAL_PROP_ProjectNature Project Nature
    TUTORIAL_PROP_ResourceFilter Filter
    TUTORIAL_PROP_NewName New Name
  15. Right-click TUTORIAL_PROP_ProjectNature, and then click Edit.

    This opens the Edit Properties dialog box.

  16. Double-click the Label value cell, and then type the label name of your choice.
  17. Click OK.
  18. Repeat steps 15 through 17 for the following properties adding a suitable label name of your choice each time:
    • TUTORIAL_PROP_ResourceFilter
    • TUTORIAL_PROP_NewName
  19. Click OK.