String (@NotNull String fullPath, @Nullable TargetEnvironmentConfiguration targetEnvConfig) { if (SwingUtilities.isEventDispatchThread()) { // Run under progress // TODO: use pyModalBlocking when we merge two modules return ProgressManager.getInstance() .run(new Task.WithResult<@Nullable @Nls String, RuntimeException>(null, PySdkBundle.message("path.validation.wait.path", fullPath), false) { @Override @Nls @Nullable protected String compute(@NotNull ProgressIndicator indicator) throws RuntimeException { return getFileExecutionError(fullPath, targetEnvConfig); } }); } else { return getFileExecutionError(fullPath, targetEnvConfig); } }