/**
   * Process the result that came from pushing some text to the interpreter.
   *
   * @param result the response from the interpreter after sending some command for it to process.
   */
  protected void processResult(final InterpreterResponse result) {
    if (result != null) {
      addToConsoleView(result.out, true);
      addToConsoleView(result.err, false);

      history.commit();
      try {
        offset = getLastLineLength();
      } catch (BadLocationException e) {
        Log.log(e);
      }
    }
    appendInvitation(false);
  }