static void registerForProgress(@NotNull Project project,
                                  @NotNull ProgressIndicatorEx indicator) {
    if (!ApplicationManager.getApplication().isHeadlessEnvironment()) {
      indicator.addStateDelegate(new DumbServiceAppIconProgress(project));
    }
  }
static void registerForProgress(@NotNull Project project,
                                  @NotNull ProgressIndicatorEx indicator)