void (@NotNull PsiElement element) { super.visitElement(element); for (PsiReference reference : element.getReferences()) { PsiElement resolved = reference.resolve(); if (resolved instanceof PsiNamedElement) { myRefCountHolder.registerLocallyReferenced((PsiNamedElement)resolved); if (resolved instanceof PsiMember) { myRefCountHolder.registerReference(reference, new CandidateInfo(resolved, PsiSubstitutor.EMPTY)); } } } }