private @NotNull static Map<VirtualFile, Collection<Change>> groupChanges(@NotNull Collection<? extends VirtualFile> rootsToSave,
                                                                           @NotNull Collection<? extends Change> allChanges,
                                                                           @NotNull ProjectLevelVcsManager vcsManager) {
    Map<VirtualFile, Collection<Change>> result = new HashMap<>();
    for (Change change : allChanges) {
      VirtualFile root = getRootForChange(change, vcsManager);
      if (root != null && rootsToSave.contains(root)) {
        Collection<Change> changes = result.computeIfAbsent(root, key -> new HashSet<>());
        changes.add(change);
      }
    }
    return result;
  }
private @NotNull static Map<VirtualFile, Collection<Change>> groupChanges(@NotNull Collection<? extends VirtualFile> rootsToSave,
                                                                           @NotNull Collection<? extends Change> allChanges,
                                                                           @NotNull ProjectLevelVcsManager vcsManager)