The "Select Local OS Resource" tool opens a native file selection dialog from the operating system to enable the user to select one or multiple local files, 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 you can select multiple files or use the “Selection for Save” mode, which has a slightly different appearance.
For example, the 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. |
Remember Last Selection | Boolean | Specifies whether the dialog reuses the last selection.
If a pre-set file has been specified as an input parameter the value of this argument is not used. See Input Parameters for more information. Only visible if the File Dialog Behavior attribute is not set to “Multi-selection” and the Resource Type attribute is “Local OS File". |
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.
Usage of this parameter overrides the behavior of the "Remember Last Selection" tool attribute. 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 specified. Each filter is separated by “/”, while every extension must be separated by “;”. For 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: