content.remove(offset, length);
Element[] added = new Element[1]; added[0] = root.getElement(start); boolean shouldFire = content.getString(offset, length).length() != 0;  writeLock(); UndoableEdit temp = content.remove(offset, length); writeUnlock();
  public void remove(int offset, int length) throws BadLocationException  {    DefaultDocumentEvent event =      new DefaultDocumentEvent(offset, length,			       DocumentEvent.EventType.REMOVE);    removeUpdate(event);    content.remove(offset, length);    postRemoveUpdate(event);    fireRemoveUpdate(event);  }