private static void checkCancelled(int iterationNo) throws ProcessCanceledException {
      //don't check cancellation on each iteration, since it may affect performance too much -- check each 16th iteration
      if (iterationNo % CHECK_CANCELLED_EACH == CHECK_CANCELLED_EACH - 1) {
        ProgressManager.checkCanceled();
      }
    }
private static void checkCancelled(int iterationNo)