public static <T> void processItemsByVcs(@NotNull Collection<? extends T> items,
                                           @NotNull VcsSeparator<? super T> separator,
                                           @NotNull PerVcsProcessor<T> processor) {
    Map<AbstractVcs, List<T>> changesByVcs = new HashMap<>();
    ReadAction.run(() -> {
      for (T item : items) {
        AbstractVcs vcs = separator.getVcsFor(item);
        if (vcs != null) {
          changesByVcs.computeIfAbsent(vcs, __ -> new ArrayList<>()).add(item);
        }
      }
    });

    changesByVcs.forEach(processor::process);
  }
public static <T> void processItemsByVcs(@NotNull Collection<? extends T> items,
                                           @NotNull VcsSeparator<? super T> separator,
                                           @NotNull PerVcsProcessor<T> processor)