public static @Nullable NonCodeUsageInfo create(@NotNull PsiFile file,
                                                  int startOffset,
                                                  int endOffset,
                                                  PsiElement referencedElement,
                                                  String newText) {
    PsiElement element = file.findElementAt(startOffset);
    while(element != null){
      TextRange range = element.getTextRange();
      if (range.getEndOffset() < endOffset){
        element = element.getParent();
      }
      else{
        break;
      }
    }

    if (element == null) return null;

    int elementStart = element.getTextRange().getStartOffset();
    startOffset -= elementStart;
    endOffset -= elementStart;
    return new NonCodeUsageInfo(element, startOffset, endOffset, referencedElement, newText);
  }
public static @Nullable NonCodeUsageInfo create(@NotNull PsiFile file,
                                                  int startOffset,
                                                  int endOffset,
                                                  PsiElement referencedElement,
                                                  String newText)