@Override
  public int getLineNumber(final int offset) {
    try {
      return myTextArea.getLineOfOffset(offset);
    }
    catch (BadLocationException e) {
      throw new RuntimeException(e);
    }
  }
@Override
  public int getLineNumber(final int offset)