boolean (@NotNull VirtualFile dir) { var projectIndexes = IdeaGateway.getVersionedFilterData().myProjectFileIndices; ProjectFileIndex containingProjectIndex = null; for (var projectIndex : projectIndexes) { if (!projectIndex.isInProject(dir)) continue; if (containingProjectIndex != null) return false; // more than 1 project contains this dir containingProjectIndex = projectIndex; } if (containingProjectIndex == null) return false; // no project contains this dir containingProjectIndex.iterateContentUnderDirectory(dir, fileOrDir -> { if (isVersioned(fileOrDir)) { myVcs.created(myGateway.getPathOrUrl(fileOrDir), fileOrDir.isDirectory()); } return true; }, file -> isVersioned(file)); return true; }