Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR supersedes #276 and #285. (I created a new one because I made further changes to the
chooseFiles
method signature that can be discussed here.)Together with the changes in scijava/scijava-ui-swing@master...imagejan:file-input-enhanced and imagej/imagej-legacy@master...imagejan:file-input-enhanced, this renders
File[]
inputs possible to be resolved interactively:Single inputs of type
File[]
will open a file chooser that allows multiple files/directories to be opened.When combined with other script parameters, a list widget is created, e.g. the following Groovy script will show the input dialog shown below:
A simple filter for file extensions can be created via
style
attributes as shown in the example (keywordextensions
followed by:
and the desired extensions separated by/
).Both
File
andFile[]
input widgets are now drag-and-drop targets.Double-clicking an item on the file list removes it from the list.
@ctrueden if you happen to have a look, feel free to force push changes to the
file-input-enhanced
branch on my fork (I checked Allow edits from maintainers, so you should be able to push to my fork?!). I'll be mostly offline next week, but would love to hear/read your opinion when I'm back in the office on August 7.