Specifying the Action Descriptors

AWM tools require action descriptors to enable the tools to be called within an application, for example, as a context menu command, or as a get children action.

This tutorial requires you to model three action descriptors:

Specifying an Action Descriptor to Get Eclipse Projects

To specify an action descriptor to get Eclipse projects:

  1. Right-click the Action Descriptors category folder, and then click New Child > Action Descriptor .

    This opens the Enter Object ID dialog box.

  2. In the New ID field, type TUTORIAL_ACT_GetProjects.
  3. Click OK.
  4. Right-click TUTORIAL_ACT_GetProjects, and then click New Child > Tool .

    This adds a tool with a missing Target ID.

  5. Right-click Tool, and then click Edit.

    This opens the Edit Properties dialog box.

  6. Double-click the Target ID value cell, and then click TUTORIAL_TOOL_GetProjects.
  7. Click OK.
  8. In order to display the element list in the UI, you must add a Create Element List step to the action.

    Right-click the action TUTORIAL_ACT_GetProjects and select New Child > Create Element List.

    This adds a new Create Element List relationship to the action.

  9. Right-click Create Element List -TARGET_ID_MISSING, and then click Edit.

    This opens the Edit Properties dialog box.

  10. Under Target ID select the file descriptor TUTORIAL_FD_EclipseResources.
  11. Click OK.

Specifying an Action Descriptor to Get the Children of an Eclipse Resource

To specify an action descriptor to get the children of an Eclipse resource:

  1. Right-click the Action Descriptors category folder, and then click New Child > Action Descriptor .

    This opens the Enter Object ID dialog box.

  2. In the New ID field, type TUTORIAL_ACT_GetResChildren.
  3. Click OK.
  4. Right-click TUTORIAL_ACT_GetResChildren, and then click New Child > Tool .

    This adds a tool with a missing Target ID.

  5. Right-click Tool, and then click Edit.

    This opens the Edit Properties dialog box.

  6. Double-click the Target ID value cell, and then click TUTORIAL_TOOL_GetResChildren.
  7. Click OK.
  8. In order to display the element list in the UI, you must add a Create Element List step to the action.

    Right-click the action TUTORIAL_ACT_GetResChildren and select New Child > Create Element List.

    This adds a new Create Element List relationship to the action.

  9. Right-click Create Element List -TARGET_ID_MISSING, and then click Edit.

    This opens the Edit Properties dialog box.

  10. Under Target ID select the file descriptor TUTORIAL_FD_EclipseResources.
  11. Click OK.

Specifying an Action Descriptor to Rename an Eclipse Resource

To specify an action descriptor to rename an Eclipse resource:

  1. Right-click the Action Descriptors category folder, and then click New Child > Action Descriptor .

    This opens the Enter Object ID dialog box.

  2. In the New ID field, type TUTORIAL_ACT_RenameRes.
  3. Click OK.
  4. Right-click TUTORIAL_ACT_RenameRes, and then click Edit.

    This opens the Edit Properties dialog box.

  5. Double-click the Label value cell, and then type Rename.
  6. Click OK.
  7. Right-click TUTORIAL_ACT_RenameRes, and then click New Child > Tool .

    This adds a tool with a missing Target ID.

  8. Right-click Tool, and then click Edit.

    This opens the Edit Properties dialog box.

  9. Double-click the Target ID value cell, and then click TUTORIAL_TOOL_DIA_RenameInput.
  10. Click OK.
  11. Right-click TUTORIAL_ACT_RenameRes, and then click New Child > Tool .

    This adds a tool with a missing Target ID.

  12. Right-click Tool, and then click Edit.

    This opens the Edit Properties dialog box.

  13. Double-click the Target ID value cell, and then click TUTORIAL_TOOL_RenameRes.
  14. Click OK.

    Your action descriptors should look like:


    Action Descriptors

    You only need to make the associations for the new actions.

  15. Right-click Application Options, and then click Edit.

    This opens the Edit Properties dialog box.

  16. Double-click the Root Containers Action value cell, and then click TUTORIAL_ACT_GetProjects.
  17. Click OK.
  18. In the Element Types category folder, right-click TUTORIAL_ELE_EclipseProject, and then click New Child > Get Children Action .
  19. Right-click Get Children Action, and then click Edit.

    This opens the Edit Properties dialog box.

  20. Double-click the Target ID value cell, and then click TUTORIAL_ACT_GetResChildren.
  21. Click OK.
  22. Right-click TUTORIAL_ELE_EclipseFolder, and then click New Child > Get Children Action .
  23. Right-click Get Children Action, and then click Edit.

    This opens the Edit Properties dialog box.

  24. Double-click the Target ID value cell, and then click TUTORIAL_ACT_GetResChildren.
  25. Click OK.
  26. You require an Eclipse resource (project or folder) to be displayed as expandable only when it actually has children. You can achieve this by specifying an enabling condition depending on the linked property TUTORIAL_PROP_ResHasChildren to an element type's Get Children Action:

    In the Element Types category folder, expand TUTORIAL_ELE_EclipseProject.

  27. Right-click Get Children Action > TUTORIAL_ACT_GetResChildren, and then click New Child > Enable Condition .
  28. Right-click Enable Condition, and then click New Child > Simple Condition .
  29. Right-click Simple Condition, and then click Edit.

    This opens the Edit Properties dialog box.

  30. Double-click the Target ID value cell, and then click TUTORIAL_PROP_ResHasChildren.
  31. Double-click the Value value cell, and then type true.
  32. Click OK.
  33. In the Element Types category folder, expand TUTORIAL_ELE_EclipseFolder.
  34. Right-click Get Children Action > TUTORIAL_ACT_GetResChildren, and then click New Child > Enable Condition .
  35. Right-click Enable Condition, and then click New Child > Simple Condition .
  36. Right-click Simple Condition, and then click Edit.

    This opens the Edit Properties dialog box.

  37. Double-click the Target ID value cell, and then click TUTORIAL_PROP_ResHasChildren.
  38. Double-click the Value value cell, and then type true.
  39. Click OK.