private static @NotNull Collection<DocumentReference> collectReferencesWithoutMergers(@NotNull ClientState state) {
    Set<DocumentReference> result = new HashSet<>();
    state.myUndoStacksHolder.collectAllAffectedDocuments(result);
    state.myRedoStacksHolder.collectAllAffectedDocuments(result);
    return result;
  }
private static @NotNull Collection<DocumentReference> collectReferencesWithoutMergers(@NotNull ClientState state)