SearchScope () { if (isUnnamed()) { return LocalSearchScope.EMPTY; } final PsiElement parentElement = getParent(); if (parentElement instanceof PsiDeclarationStatement) { return new LocalSearchScope(parentElement.getParent()); } return ResolveScopeManager.getElementUseScope(this); }