Commit 54222b81 authored by Axel Howind's avatar Axel Howind

add FileChooserBuilder.showOpenMultipleDialog(); update spotbugs; release 0.8.2

parent 49dbebe5
Pipeline #113252184 passed with stages
in 10 minutes and 18 seconds
Changelog
=========
#### Version 0.8.2
- added FileChooserBuilder.showOpenMultipleDialog()
- update JavaFX to 13.0.2
- update utility to 5.1.1
- update spotbugs to 4.0.0-RC1
#### Version 0.8.1
- fix scroll to first line in markdowneditor if first line is not labeled (i.e. when using `${toc}`).
......
......@@ -35,7 +35,7 @@ subprojects {
/////////////////////////////////////////////////////////////////////////////
group = 'com.dua3.fx'
version = '0.8.2-SNAPSHOT'
version = '0.8.2'
ext.moduleName = project.group
ext.scm = 'https://gitlab.com/com.dua3/lib/fx.git'
......@@ -212,7 +212,7 @@ subprojects {
if (run_spotbugs) {
apply plugin: 'com.github.spotbugs'
spotbugs.toolVersion = '4.0.0-beta4'
spotbugs.toolVersion = '4.0.0-RC1'
spotbugs.excludeFilter = rootProject.file('spotbugs-exclude.xml')
tasks.withType(com.github.spotbugs.SpotBugsTask) {
......
......@@ -15,11 +15,7 @@
package com.dua3.fx.util;
import java.io.File;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.*;
import javafx.stage.FileChooser;
import javafx.stage.FileChooser.ExtensionFilter;
......@@ -51,6 +47,19 @@ public class FileChooserBuilder {
return Optional.ofNullable(chooser.showOpenDialog(parent));
}
/**
* Show "Open multiple" dialog.
* @param parent
* the parent window
* @return
* a List containing the selected files, or an empty list if no files were selected
*/
public List<File> showOpenMultipleDialog(Window parent) {
FileChooser chooser = build();
List<File> files = chooser.showOpenMultipleDialog(parent);
return files == null ? Collections.emptyList() : files;
}
/**
* Show "Save" dialog.
* @param parent
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment