modified = true;
changes = new HashMap(); int count = edits.size(); for (int i = 0; i < count; i++) { Object o = edits.elementAt(i); if (o instanceof DocumentEvent.ElementChange) { DocumentEvent.ElementChange ec = (DocumentEvent.ElementChange) o; changes.put(ec.getElement(), ec); } } }  if (changes != null && edit instanceof DocumentEvent.ElementChange) {
    public boolean addEdit(UndoableEdit edit)    {      // XXX - Fully qualify ElementChange to work around gcj bug #2499.      if (edit instanceof DocumentEvent.ElementChange)        {          modified = true;          DocumentEvent.ElementChange elEdit =            (DocumentEvent.ElementChange) edit;          changes.put(elEdit.getElement(), elEdit);        }      return super.addEdit(edit);    }