GlobalSearchScope (@NotNull PsiFile containingFile) { Project project = containingFile.getProject(); GlobalSearchScope scope = myJavaClassReferenceSet.getProvider().getScope(project); if (scope == null) { Module module = ModuleUtilCore.findModuleForPsiElement(containingFile); return module == null ? GlobalSearchScope.allScope(project) : module.getModuleWithDependenciesAndLibrariesScope(true); } return scope; }