private static @Nullable PsiElement bindNonJavaReference(PsiElement bindTo, PsiElement element, UsageInfo usage) {
    if (element instanceof PsiFile) return null; // rename of files is not supported yet, IDEA-272542

    final TextRange range = usage.getRangeInElement();
    for (PsiReference reference : element.getReferences()) {
      if (reference instanceof JavaClassReference classReference && classReference.getRangeInElement().equals(range)) {
        return classReference.bindToElement(bindTo);
      }
    }
    return bindTo;
  }
private static @Nullable PsiElement bindNonJavaReference(PsiElement bindTo, PsiElement element, UsageInfo usage)