if (aClass instanceof PsiAnonymousClass) {
PsiElement methodCallExpr = PsiUtil.isLanguageLevel8OrHigher(aClass) ? PsiTreeUtil.getTopmostParentOfType(aClass, PsiStatement.class)
: PsiTreeUtil.getParentOfType(aClass, PsiMethodCallExpression.class);
return new LocalSearchScope(methodCallExpr != null ? methodCallExpr : aClass);
}
<BUG>if (member.hasModifierProperty(PsiModifier.PUBLIC)) {
return maximalUseScope; // class use scope doesn't matter, since another very visible class can inherit from aClass
}
else if (member.hasModifierProperty(PsiModifier.PROTECTED)) {
return maximalUseScope; // class use scope doesn't matter, since another very visible class can inherit from aClass
}
else if (member.hasModifierProperty(PsiModifier.PRIVATE)) {</BUG>
PsiClass topClass = PsiUtil.getTopLevelClass(member);

if (aClass instanceof PsiAnonymousClass) {
PsiElement methodCallExpr = PsiUtil.isLanguageLevel8OrHigher(aClass) ? PsiTreeUtil.getTopmostParentOfType(aClass, PsiStatement.class)
: PsiTreeUtil.getParentOfType(aClass, PsiMethodCallExpression.class);
return new LocalSearchScope(methodCallExpr != null ? methodCallExpr : aClass);
