-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make eager I/O plugins work with File > Open
The interceptFileOpen hook runs *before* any dialogs are shown when invoked via File > Open. When new-style I/O is enabled, a suitable file opener dialog is displayed by running the GetPath command. But when new-style I/O is *not* enabled, the path is simply null, and when handed to the getEagerHandler method, triggers a NullPointerException in the abstract I/O service infrastructure. The fix in this patch is to *always* respond to a null initial path by running the GetPath command, even if new-style I/O is disabled. This change means that the original ImageJ's file chooser dialog will never be shown directly anymore, which feels a bit strange. But in practice, the modified behavior very closely resembles the old behavior, so hopefully this fix will not cause any problems downstream. And it makes the eager I/O plugins work as intended with File > Open.
- Loading branch information
Showing
1 changed file
with
55 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters