private static void checkIndicator(@Nullable ProgressIndicator indicator) {
    if (indicator != null) {
      indicator.checkCanceled();
    }
    else {
      ProgressManager.checkCanceled();
    }
  }
private static void checkIndicator(@Nullable ProgressIndicator indicator)