boolean (@NotNull Context context) { if (context.directory != null) return true; FileChooserDescriptor descriptor = new FileChooserDescriptor(false, true, false, false, false, false); descriptor.setTitle(VcsBundle.message("dialog.title.select.destination.folder")); descriptor.setDescription(""); VirtualFile[] files = FileChooser.chooseFiles(descriptor, null, null); context.directory = files.length == 0 ? null : files[0]; return context.directory != null; }