void print(@NotNull String text, @NotNull ConsoleViewContentType contentType, @Nullable HyperlinkInfo info) {
    int start = 0;
    while (start < text.length()) {
      if (hasTrailingCR()) {
        combineTrailingCRWith(text);
      }
      int crIndex = text.indexOf('\r', start);
      if (crIndex == -1 || crIndex == text.length() - 1) {
        TokenInfo tokenInfo = new TokenInfo(contentType, text.substring(start), info);
        tokens.addLast(tokenInfo);
        size += tokenInfo.length();
        break;
      }

      if (start!=crIndex) {
        TokenInfo tokenInfo = new TokenInfo(contentType, text.substring(start, crIndex), info);
        tokens.addLast(tokenInfo);
        size += tokenInfo.length();
      }
      removeLastLine();
      // text[start..crIndex) should be removed
      start = crIndex + 1;
    }
    trim();
  }
void print(@NotNull String text, @NotNull ConsoleViewContentType contentType, @Nullable HyperlinkInfo info)