private @NotNull ProgressIndicator getIndicator() {
      return myIndicator != null ?
             myIndicator :
             ApplicationManager.getApplication().isHeadlessEnvironment() ?
             new EmptyProgressIndicator() :
             new BackgroundableProcessIndicator(myTask); // BackgroundableProcessIndicator should be created from EDT
    }
private @NotNull ProgressIndicator getIndicator()