@Override
  protected void doCheckCanceled() throws ProcessCanceledException {
    if (isInNonCancelableSection()) {
      CheckCanceledBehavior behavior = ourCheckCanceledBehavior;
      if (behavior != CheckCanceledBehavior.NONE) {
        ProgressIndicator indicator = behavior == CheckCanceledBehavior.INDICATOR_PLUS_HOOKS ? getProgressIndicator() : null;
        runCheckCanceledHooks(indicator);
      }
      return;
    }

    Cancellation.checkCancelled();

    CheckCanceledBehavior behavior = ourCheckCanceledBehavior;
    if (behavior == CheckCanceledBehavior.NONE) return;

    if (behavior == CheckCanceledBehavior.INDICATOR_PLUS_HOOKS) {
      ProgressIndicator progress = getProgressIndicator();
      if (progress != null) {
        progress.checkCanceled();
      }
    }
    else {
      runCheckCanceledHooks(null);
    }
  }
@Override
  protected void doCheckCanceled()