GlobalSearchScope (PsiElement element, boolean dependencies) { final Module module = getModule(element); if (module != null) { return dependencies ? GlobalSearchScope.moduleWithDependenciesScope(module) : GlobalSearchScope.moduleWithDependentsScope(module); } else { return GlobalSearchScope.projectScope(element.getProject()); } }