Collection<PsiReference> (@NotNull final PsiElement target, @NotNull final SearchScope searchScope) { if (target instanceof PsiMethod) { Set<PsiMethod> superTargets = new LinkedHashSet<>(); PsiMethod[] superMethods = ((PsiMethod)target).findDeepestSuperMethods(); if (superMethods.length == 0) { superTargets.add((PsiMethod)target); } if (searchScope instanceof LocalSearchScope) { PsiElement[] scopeElements = ((LocalSearchScope)searchScope).getScope(); GlobalSearchScope resolveScope = GlobalSearchScope.union(ContainerUtil.map2Array(scopeElements, GlobalSearchScope.class, PsiElement::getResolveScope)); for (HierarchicalMethodSignature superSignature : PsiSuperMethodImplUtil.getHierarchicalMethodSignature((PsiMethod)target, resolveScope) .getSuperSignatures()) { PsiMethod method = superSignature.getMethod(); PsiMethod[] deepestSupers = method.findDeepestSuperMethods(); Collections.addAll(superTargets, deepestSupers.length == 0 ? new PsiMethod[]{method} : deepestSupers); } } else { Collections.addAll(superTargets, superMethods); } Collection<PsiReference> result = new LinkedHashSet<>(); for (PsiMethod superMethod : superTargets) { result.addAll(MethodReferencesSearch.search(superMethod, searchScope, true).findAll()); } return result; } return super.findReferencesToHighlight(target, searchScope); }