void (PsiFile file, final PsiElement element) { final PsiJavaCodeReferenceElement refExpr = ObjectUtils.tryCast(element.getParent(), PsiJavaCodeReferenceElement.class); if (refExpr == null) return; final String referenceName = refExpr.getReferenceName(); final JavaResolveResult[] targets = refExpr.multiResolve(false); for (JavaResolveResult target : targets) { final PsiElement resolved = target.getElement(); if (resolved != null) { bindAllClassRefs(file, resolved, referenceName, getResolvedClass(element, (PsiMember)resolved)); return; } } }