void (final @NotNull FileChooserDescriptor descriptor, final @Nullable Project project, final @Nullable Component parent, final @Nullable VirtualFile toSelect, final @NotNull Consumer<? super VirtualFile> callback) { LOG.assertTrue(!descriptor.isChooseMultiple()); chooseFiles(descriptor, project, parent, toSelect, files -> callback.consume(files.get(0))); }