@Override
    public void replaceText(int startIndex, int endIndex, String s) {
      editDocumentSafely(startIndex, endIndex - startIndex, s);
    }
@Override
    public void replaceText(int startIndex, int endIndex, String s)