myEntities = new LinkedList(myEditorInput.getModel().getEntities()); Iterator newEntitiesIter = myEntities.iterator(); while (newEntitiesIter.hasNext()) { EOEntity entity = (EOEntity) newEntitiesIter.next(); entity.addPropertyChangeListener(myEntityListener); } myEditorInput.getModel().addPropertyChangeListener(myModelListener);
  protected void updatePropertyChangeListeners() {    myEditorInput.getModel().removePropertyChangeListener(myModelListener);    if (myEntities != null) {      Iterator oldEntitiesIter = myEntities.iterator();      while (oldEntitiesIter.hasNext()) {        EOEntity entity = (EOEntity) oldEntitiesIter.next();        entity.removePropertyChangeListener(myEntityListener);      }    }    myEntities = new LinkedList(myEditorInput.getModel().getEntities());    Iterator newEntitiesIter = myEntities.iterator();    while (newEntitiesIter.hasNext()) {      EOEntity entity = (EOEntity) newEntitiesIter.next();      entity.addPropertyChangeListener(myEntityListener);    }    myEditorInput.getModel().addPropertyChangeListener(myModelListener);  }