@Override
    public String getTextRange(int startIndex, int endIndex) {
      return editor.getDocument().getCharsSequence().subSequence(startIndex, endIndex).toString();
    }
@Override
    public String getTextRange(int startIndex, int endIndex)