private static @NotNull TextRange createTextRange(PsiElement element, int offset) {
    int valueEndOffset = element.getTextLength() - offset;
    // in case of not closed quote
    return new TextRange(offset, Math.max(offset, valueEndOffset));
  }
private static @NotNull TextRange createTextRange(PsiElement element, int offset)