public static String findUnloadedModuleByContentRoot(@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;
  }
public static String findUnloadedModuleByContentRoot(@NotNull final VirtualFile root, @NotNull Project project)