@Override
  protected @NotNull ProgressIndicator createDefaultAsynchronousProgressIndicator(@NotNull Task.Backgroundable task) {
    if (ApplicationManager.getApplication().isHeadlessEnvironment()) {
      return shouldKeepTasksAsynchronousInHeadlessMode()
             ? new ProgressIndicatorBase()
             : new EmptyProgressIndicator();
    }
    Project project = task.getProject();
    return project != null && project.isDisposed() ? new EmptyProgressIndicator() : new BackgroundableProcessIndicator(task);
  }
@Override
  protected @NotNull ProgressIndicator createDefaultAsynchronousProgressIndicator(@NotNull Task.Backgroundable task)