SearchScope (Editor editor, @NotNull final PsiElement element) { final PsiReferenceExpression referenceExpression = editor != null ? findReferenceExpression(editor) : null; if (referenceExpression != null && element instanceof PsiMethod) { if (!PsiUtil.canBeOverridden((PsiMethod)element)) { return element.getUseScope(); } final PsiClass[] memberClass = getClassesWithMember(referenceExpression, (PsiMember)element); if (memberClass != null && memberClass.length == 1) { PsiClass aClass = memberClass[0]; return CachedValuesManager.getCachedValue(aClass, () -> { return new CachedValueProvider.Result<>(getHierarchyScope(aClass, aClass.getUseScope(), true), PsiModificationTracker.MODIFICATION_COUNT); }); } } return super.getSearchScope(editor, element); }