List<Change> (@NotNull Collection<? extends Change> changes, @NotNull Set<? extends VirtualFile> rootsToSave) { ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(project); return ContainerUtil.filter(changes, change -> { return rootsToSave.contains(vcsManager.getVcsRootFor(ChangesUtil.getFilePath(change))); }); }