void (final @NotNull FileChooserDescriptor descriptor, final @Nullable Project project, final @Nullable Component parent, final @Nullable VirtualFile toSelect, final @NotNull Consumer<? super List<VirtualFile>> callback) { Component parentComponent = parent == null ? WindowManager.getInstance().suggestParentWindow(project) : parent; final FileChooserFactory factory = FileChooserFactory.getInstance(); final PathChooserDialog pathChooser = factory.createPathChooser(descriptor, project, parentComponent); pathChooser.choose(toSelect, callback); }