The tool enables mass processing. Passing several paths as input will return a list of all folder and files contained in the given paths.
The sample demonstrates how to specify an AWM tool including the file output parameter and the properties used by the file output parameter. As the file output parameter and its properties are defined by the extension they are automatically generated when the tool is specified in an AWM model.
The following screenshot shows how this plug-in extends the AWM model extension point. The extension contains a toolType, fileDescriptor, and modelProperty.
There are two instances of this tool modelled in the GetLocalFiles.model available under the models folder of the plug-in project as follows:
The Java class GetLocalFilesToolExecutor under the src folder package of the plug-in project shows how the input parameter is obtained if available and how the file output parameter is returned making use of the corresponding AWM API methods. It also shows you how the mass processing input is handled within the executeMassProcessing method.
In your Eclipse run-time environment you can test the tool by expanding the application under a AWM Custom System. You will be able to see the content of your local user's home directory. By further expanding folders the tool is called again with the path to the selected folder as input parameter.
You can also select one or more folders and select Show Files in Table from the context menu. This will call the sample tool with the path(s) of the selected folder(s) as input and returning the overall content of those folders in the Table Results view.