boolean (PsiReference ref) { if (ref.resolve() != null) { return true; } if (ref instanceof PsiPolyVariantReference) { return ((PsiPolyVariantReference)ref).multiResolve(false).length > 0; } return false; }