MappedRoot (@NotNull VcsDirectoryMapping mapping, @NotNull Disposable pointerDisposable) { AbstractVcs vcs = getMappingsVcs(mapping); String rootPath = mapping.getDirectory(); return ReadAction.compute(() -> { VirtualFilePointerManager.getInstance().create(VfsUtilCore.pathToUrl(rootPath), pointerDisposable, myFilePointerListener); VirtualFile vcsRoot = LocalFileSystem.getInstance().findFileByPath(rootPath); if (vcsRoot == null || !vcsRoot.isDirectory()) { return null; } if (checkMappedRoot(vcs, vcsRoot)) { return new MappedRoot(vcs, mapping, vcsRoot); } else { return new MappedRoot(null, mapping, vcsRoot); } }); }