String (@NotNull final VirtualFile root, @NotNull Project project) { if (project.isDefault()) return null; ProjectFileIndex fileIndex = ProjectFileIndex.getInstance(project); if (fileIndex.isExcluded(root) && root.equals(fileIndex.getContentRootForFile(root, false))) { return fileIndex.getUnloadedModuleNameForFile(root); } return null; }