The "Select Local OS Resource" tool opens a native file selection dialog from the operating system to enable the user to select one (or several) local files (see figure), or an Eclipse folder selection dialog to select a local folder.
Attribute | Type | Description |
---|---|---|
Resource Type | Selection | Specifies whether the selection dialog should prompt for a folder or file. If the value is “Local OS File”, the dialog does
not allow the user to select a folder and vice versa.
Possible values:
|
File Dialog Behavior | Selection | Specifies whether to allow selecting multiple files or use the “Selection for Save” mode, which has a slightly different
appearance. For example, confirm button is labelled “Save” instead of “Open”.
The attribute is only visible if the Resource Type attribute is “Local OS File”, since multi-selection and “Selection for Save” are currently not supported for folders. Possible values:
|
Title | String | Specifies the dialog title. If empty, the operating system default title is used, for example, “Open” or “Save”. |
Message | String | Sets a user message for the folder selection dialog.
Only visible if the Resource Type attribute is set to “Local OS Folder”, since the file selection dialog does not have a message field. |
Show Optional Parameters | Boolean | Specifies whether to add optional input parameters to the tool descriptor. See Input Parameters for more information. |
Parameter No | I/O | Type | Description |
---|---|---|---|
1 [O] | I | String | The pre-set path of the selection dialog. |
2 [O] | I | String | The pre-set file name of the file selection dialog.
Only available if the Resource Type attribute is set to “Local OS File”. |
3 [O] | I | String | File extension filters for the file selection dialog. While a file extension filter is active, the dialog only shows files
matching the filter.
It is possible to define several filters and several extensions for each filter. While the first defined filter is always the default filter on opening the dialog, users can select different filters, if more than one are defined. Each filter is separated by “/”, while every extension must be separated by “;”. Example: *.txt;*.text/*.doc;*.docx Defines two filters with two extensions each. Only available if the Resource Type attribute is set to “Local OS File”. Default value: *.* (show all files) |
1 [M] | O | String/File | Used to return the selected OS resources |
All input parameters of the tool are optional. They can be enabled by setting the attribute “Show Optional Parameters” to “true”.
Selected files are always returned by a single output parameter (both for single and multi-selection). Depending on the scenario where the tool should be used, it is possible to return file names in two different ways: