PsiElement (PsiReference psiReference) { if (psiReference instanceof PsiPolyVariantReference) { ResolveResult[] results = ((PsiPolyVariantReference)psiReference).multiResolve(true); if (results.length == 1) return results[0].getElement(); } return psiReference.resolve(); }