Specifying the Tools Descriptors

You need to specify four tools for this tutorial:

Specifying a Tool to Get All Projects

To specify a tool to get all projects:

  1. Right-click the Tool Descriptors category folder, and then click New Child > Eclipse > Get Eclipse Projects.

    This opens the Enter Object ID dialog box.

  2. In the New ID field, type TUTORIAL_TOOL_GetProjects.
  3. Click OK.

    This creates a tool with a String Input Parameter and File Output Parameter.

  4. Right-click String Input Parameter, and then click Edit.

    This opens the Edit Properties dialog box.

  5. Double-click the Target ID Parm value cell, and then click TUTORIAL_PROP_ProjectNature.
  6. Double-click the Static Value value cell, and then type .*com.microfocus.eclipse.*
  7. Click OK.

The Get Eclipse Projects tool returns a file descriptor with two properties:

  • Eclipse resource ID.
  • Match name to identify the element type.

See Get Eclipse Projects for more information

You need to specify an appropriate file descriptor for the output:

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

    This opens the Enter Object ID dialog box.

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

    This opens the Edit Properties dialog box.

  5. Double-click the Prop Delimiter value cell, and then type "<!>".
    Note: This attribute defines the delimiter by which the Eclipse resource names are separated from the match name in the file. You should chose a property delimiter which does not appear in any of your Eclipse resource names including the project path.
  6. Double-click the Structure value cell, and then click Table.
  7. Double-click the Type value cell, and then click InputStream.
  8. Click OK.

    You need to add two Has Property to the file descriptor:

  9. Right-click TUTORIAL_FD_EclipseResource, and then click New Child > Property.
  10. Right-click Has Property, and then click Edit.

    This opens the Edit Properties dialog box.

  11. Double-click the Target ID value cell, and then click TUTORIAL_PROP_ResourceID.
  12. Click OK.
  13. Right-click TUTORIAL_FD_EclipseResource, and then click New Child > Property.
  14. Right-click Has Property, and then click Edit.

    This opens the Edit Properties dialog box.

  15. Double-click the Target ID value cell, and then click TUTORIAL_PROP_EleType.
  16. Click OK.
  17. For the TUTORIAL_TOOL_GetProjects tool, right-click File Output Parameter, and then click Edit.

    This opens the Edit Properties dialog box.

  18. Double-click Target ID File, and then click TUTORIAL_FD_EclipseResources.
  19. Click OK.

Specifying a Tool to Get Children of an Eclipse Resource

To specify a tool to get children of an Eclipse resource:

  1. Right-click the Tool Descriptors category folder, and then click New Child > Eclipse > Get Resource Children.

    This opens the Enter Object ID dialog box.

  2. In the New ID field, type TUTORIAL_TOOL_GetResChildren.
  3. Click OK.

    This creates a tool with two String Input Parameter and a File Output Parameter.

  4. Right-click the first String Input Parameter, and then click Edit.

    This opens the Edit Properties dialog box.

  5. Double-click the Target ID Parm value cell, then click TUTORIAL_PROP_ResourceID.
  6. Click OK.
  7. Right-click the second String Input Parameter, and the click Edit.

    This opens the Edit Properties dialog box.

  8. Double-click the Target ID Parm value cell, then click TUTORIAL_PROP_ResourceFilter.
  9. Click OK.
  10. Right-click the File Output Parameter, and then click Edit.

    This opens the Edit Properties dialog box.

  11. Double-click the Target ID File value cell, and then click TUTORIAL_FD_EclipseResources.

    The structure of the output file is the same as the output file of the first tool. This enables you to use the same file descriptor for both tools.

  12. Click OK.

Specifying a Tool to Rename an Eclipse Resource

To specify a tool to rename an Eclipse resource:

  1. Right-click the Tool Descriptors category folder, and then click New Child > Eclipse > Rename Resource.

    This opens the Enter Object ID dialog box.

  2. In the New ID field, type TUTORIAL_TOOL_RenameRes.
  3. Click OK.

    This creates a tool with two String Input Parameter children.

  4. Right-click the first String Input Parameter, and then click Edit.

    This opens the Edit Properties dialog box.

  5. Double-click the Target ID Parm value cell, then click TUTORIAL_PROP_ResourceID.
  6. Click OK.
  7. Right-click the second String Input Parameter, and then click Edit.

    This opens the Edit Properties dialog box.

  8. Double-click the Target ID Parm value cell, then click TUTORIAL_PROP_NewName.
  9. Double-click the Parameter From value cell, and then click Previous_Tool.
  10. Click OK.

Specifying a Dialog Tool to Accept a New Name for an Eclipse Resource

To specify a dialog tool to accept a new name for an Eclipse resource:

  1. Right-click the Tool Descriptors category folder, and then click New Child > AWM > Open Modeled Dialog.

    This opens the Enter Object ID dialog box.

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

    This opens the Edit Properties dialog box.

  5. Double-click the Description value cell, and then type Rename resource &TUTORIAL_PROP_ResourceID..
  6. Double-click the Title value cell, and then type Eclipse Tutorial.
  7. Right-click TUTORIAL_TOOL_DIA_RenameInput, and then click New Child > Input Parameter.
  8. Double-click the Target ID Parm value cell, and then click TUTORIAL_PROP_NewName.
  9. Click OK.
  10. You can now preview the dialog box that the Open Modeled Dialog tool creates:

    Right-click TUTORIAL_TOOL_DIA_RenameInput, and then click Preview Dialog.

    This opens a preview of the Eclipse Tutorial dialog box.


    Eclipse Tutorial Dialog Box
  11. Click Cancel.

    This closes the preview dialog box.

    Your four tool descriptors should look like:


    Tool Descriptors