boolean (PsiElement leaf, PsiElement parent) { return SyntaxTraverser.psiTraverser(parent) .filter(PsiJavaCodeReferenceElement.class) .filter(r -> r.getTextRange().getEndOffset() < leaf.getTextRange().getEndOffset() && r.resolve() == null) .isNotEmpty(); }