boolean (final PsiReference reference, boolean checkSoft) { if (!checkSoft && reference.isSoft()) return false; if (reference instanceof PsiPolyVariantReference) { return ((PsiPolyVariantReference)reference).multiResolve(false).length == 0; } return reference.resolve() == null; }