boolean (@NotNull VirtualFile directoryFile, @NotNull Project project) { final ProjectFileIndex fileIndex = ProjectRootManager.getInstance(project).getFileIndex(); return directoryFile.equals(fileIndex.getSourceRootForFile(directoryFile)); }