@Override
    public void selectText(int startIndex, int endIndex) {
      editor.getSelectionModel().setSelection(startIndex, endIndex);
      editor.getCaretModel().moveToOffset(endIndex);
    }
@Override
    public void selectText(int startIndex, int endIndex)