FXFileChooser
FXFileChooser copied to clipboard
Allow FXFileChooser to reuse an existing observable list of paths (or files)
In certain environments (with folders of 100 000s of files) it might be helpful to run a scheduled task to keep the list of files updated. Therefore it might be useful to have FXFileChooser to work with an externally populated observable list.
Furthermore, provide a scheduled Update service which can be used in Swing and JavaFX applications.
Idea
- Decouple the directory update service from FXFileChooser
- Make FXFileChooser to use this service
Questions
- How to deal with manual refreshing? Hide it and rely only on scheduled refreshes?
This should be used as of commit 7a681dfca46aeb2407e86d530c59fc1c86dc9f10 but there is no nice creation or builder API around.
The file chooser model controls the handling of the files list. There live the FileUpdateService and FindFilesTask inside net.raumzeitfalle.fx.filechooser package. Paths and files are indexed as IndexedPath. The indexed path carries the file modified date with it so browsing no longer causes file system access. Instead a manually triggered refresh is required. This is at least finished since 6d41de8b058847c5cf460c462b9e435da48ff813.