public static @NotNull <T> Processor<T> cancelableCollectProcessor(@NotNull Collection<T> collection) {
    return new CommonProcessors.CollectProcessor<T>(collection) {
      @Override
      public boolean process(T t) {
        ProgressManager.checkCanceled();
        return super.process(t);
      }
    };
  }
public static @NotNull <T> Processor<T> cancelableCollectProcessor(@NotNull Collection<T> collection)