boolean (@NotNull String text) { PsiJavaCodeReferenceElement reference = getReference(); String name = reference.getReferenceName(); return (name == null || text.contains(name)) && Objects.equals(text, getCanonicalText()); }