void (@NotNull AnActionEvent e) { Project project = e.getRequiredData(CommonDataKeys.PROJECT); VirtualFile file = Objects.requireNonNull(JBIterable.from(e.getData(VcsDataKeys.VIRTUAL_FILES)).single()); SelectCreateExternalTargetDialog dialog = new SelectCreateExternalTargetDialog(project, file); if (dialog.showAndGet()) { String url = dialog.getSelectedURL(); boolean checkout = dialog.isCheckout(); String target = dialog.getLocalTarget().trim(); new Task.Backgroundable(project, message("progress.title.creating.external")) { @Override public void run(@NotNull ProgressIndicator indicator) { doInBackground(project, file, url, checkout, target); } }.queue(); } }