@Override
  public void setText(@NotNull CharSequence text) {
    Runnable runnable = () -> replaceString(0, getTextLength(), 0, text, LocalTimeCounter.currentTime(), true);
    if (CommandProcessor.getInstance().isUndoTransparentActionInProgress() || !myAssertThreading) {
      runnable.run();
    }
    else {
      CommandProcessor.getInstance().executeCommand(null, runnable, "", DocCommandGroupId.noneGroupId(this));
    }

    clearLineModificationFlags();
  }
@Override
  public void setText(@NotNull CharSequence text)