You need to specify four tools for this tutorial:
- A tool to get all projects from the
Micro Focus Eclipse nature.
- A tool to get the children of an Eclipse resource.
- A tool to rename an Eclipse resource.
- Dialog tool to accept a new name for an Eclipse resource.
Specifying a Tool to Get All Projects
To specify a tool to get all projects:
- Right-click the
Tool Descriptors category folder, and then click
.
This opens the
Enter Object ID dialog box.
- In the
New ID field, type
TUTORIAL_TOOL_GetProjects.
- Click
OK.
This creates a tool with a
String Input Parameter and
File Output Parameter.
- Right-click
String Input Parameter, and then click
Edit.
This opens the
Edit Properties dialog box.
- Double-click the
Target ID Parm value cell, and then click
TUTORIAL_PROP_ProjectNature.
- Double-click the
Static Value value cell, and then type
.*com.microfocus.eclipse.*
- 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:
- Right-click the
File Descriptors category folder, and then click
.
This opens the
Enter Object ID dialog box.
- In the
New ID field, type
TUTORIAL_FD_EclipseResources.
- Click
OK.
- Right-click
TUTORIAL_FD_EclipseResources, and then click
Edit.
This opens the
Edit Properties dialog box.
- 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.
- Double-click the
Structure value cell, and then click
Table.
- Double-click the
Type value cell, and then click
InputStream.
- Click
OK.
You need to add two Has Property to the file descriptor:
- Right-click
TUTORIAL_FD_EclipseResource, and then click
.
- Right-click
Has Property, and then click
Edit.
This opens the
Edit Properties dialog box.
- Double-click the
Target ID value cell, and then click
TUTORIAL_PROP_ResourceID.
- Click
OK.
- Right-click
TUTORIAL_FD_EclipseResource, and then click
.
- Right-click
Has Property, and then click
Edit.
This opens the
Edit Properties dialog box.
- Double-click the
Target ID value cell, and then click
TUTORIAL_PROP_EleType.
- Click
OK.
- For the TUTORIAL_TOOL_GetProjects tool, right-click
File Output Parameter, and then click
Edit.
This opens the
Edit Properties dialog box.
- Double-click
Target ID File, and then click
TUTORIAL_FD_EclipseResources.
- Click
OK.
Specifying a Tool to Get Children of an Eclipse Resource
To specify a tool to get children of an Eclipse resource:
- Right-click the
Tool Descriptors category folder, and then click
.
This opens the
Enter Object ID dialog box.
- In the
New ID field, type
TUTORIAL_TOOL_GetResChildren.
- Click
OK.
This creates a tool with two
String Input Parameter and a
File Output Parameter.
- Right-click the first
String Input Parameter, and then click
Edit.
This opens the
Edit Properties dialog box.
- Double-click the
Target ID Parm value cell, then click
TUTORIAL_PROP_ResourceID.
- Click
OK.
- Right-click the second
String Input Parameter, and the click
Edit.
This opens the
Edit Properties dialog box.
- Double-click the
Target ID Parm value cell, then click
TUTORIAL_PROP_ResourceFilter.
- Click
OK.
- Right-click the
File Output Parameter, and then click
Edit.
This opens the
Edit Properties dialog box.
- 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.
- Click
OK.
Specifying a Tool to Rename an Eclipse Resource
To specify a tool to rename an Eclipse resource:
- Right-click the
Tool Descriptors category folder, and then click
.
This opens the
Enter Object ID dialog box.
- In the
New ID field, type
TUTORIAL_TOOL_RenameRes.
- Click
OK.
This creates a tool with two
String Input Parameter children.
- Right-click the first
String Input Parameter, and then click
Edit.
This opens the
Edit Properties dialog box.
- Double-click the
Target ID Parm value cell, then click
TUTORIAL_PROP_ResourceID.
- Click
OK.
- Right-click the second
String Input Parameter, and then click
Edit.
This opens the
Edit Properties dialog box.
- Double-click the
Target ID Parm value cell, then click
TUTORIAL_PROP_NewName.
- Double-click the
Parameter From value cell, and then click
Previous_Tool.
- 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:
- Right-click the
Tool Descriptors category folder, and then click
.
This opens the
Enter Object ID dialog box.
- In the
New ID field, type
TUTORIAL_TOOL_DIA_RenameInput.
- Click
OK.
- Right-click
TUTORIAL_TOOL_DIA_RenameInput, and then click
Edit.
This opens the
Edit Properties dialog box.
- Double-click the
Description value cell, and then type
Rename resource &TUTORIAL_PROP_ResourceID..
- Double-click the
Title value cell, and then type
Eclipse Tutorial.
- Right-click
TUTORIAL_TOOL_DIA_RenameInput, and then click
.
- Double-click the
Target ID Parm value cell, and then click
TUTORIAL_PROP_NewName.
- Click
OK.
- 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.
- Click
Cancel.
This closes the preview dialog box.
Your four tool descriptors should look like: