Collection<VcsRootError> (@NotNull List<? extends VcsDirectoryMapping> mappings, @NotNull Collection<VcsRoot> vcsRoots) { Collection<VcsRootError> errors = new ArrayList<>(); List<String> mappedPaths = mappingsToPathsWithSelectedVcs(mappings); for (VcsRoot root : vcsRoots) { String vcsPath = root.getPath().getPath(); AbstractVcs vcs = root.getVcs(); if (vcs != null && !mappedPaths.contains(vcsPath)) { errors.add(new VcsRootErrorImpl(VcsRootError.Type.UNREGISTERED_ROOT, new VcsDirectoryMapping(vcsPath, vcs.getName()))); } } return errors; }