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