void (@Nullable Project project) { var title = ProjectBundle.message("progress.title.downloading.sdk"); new Task.Backgroundable(project, title) { @Override public void run(@NotNull ProgressIndicator indicator) { try { refreshVfs(); ApplicationManager.getApplication().invokeLater(() -> runWithEvents()); } catch (Throwable t) { if (t instanceof ControlFlowException) throw t; //must be logged in the applyLocalFix } } }.queue(); }