private void sendUserInput(@NotNull CharSequence typedText) {
    ThreadingAssertions.assertEventDispatchThread();
    if (myState.isRunning() && NEW_LINE_MATCHER.indexIn(typedText) >= 0) {
      CharSequence textToSend = ConsoleTokenUtil.computeTextToSend(getEditor(), getProject());
      if (textToSend.length() != 0) {
        myFlushUserInputAlarm.addRequest(() -> {
          if (myState.isRunning()) {
            try {
              // this may block forever, see IDEA-54340
              myState.sendUserInput(textToSend.toString());
            }
            catch (IOException ignored) {
            }
          }
        }, 0);
      }
    }
  }
private void sendUserInput(@NotNull CharSequence typedText)