boolean (@NotNull final VcsDirectoryMapping mapping) { if (mapping.isDefaultMapping()) return true; AbstractVcs vcs = myVcsManager.findVcsByName(mapping.getVcs()); if (vcs == null) return false; VcsRootChecker rootChecker = myVcsManager.getRootChecker(vcs); VirtualFile directory = LocalFileSystem.getInstance().findFileByPath(mapping.getDirectory()); return directory != null && rootChecker.validateRoot(directory); }