public static boolean isCanceled(@NotNull Future<? extends ProgressIndicator> progressFuture) {
    try {
      return progressFuture.get().isCanceled();
    }
    catch (Throwable e) {
      return false;
    }
  }
public static boolean isCanceled(@NotNull Future<? extends ProgressIndicator> progressFuture)