myEditorInput.getModel().removePropertyChangeListener(myModelListener); if (myEntities != null) { Iterator oldEntitiesIter = myEntities.iterator(); while (oldEntitiesIter.hasNext()) { EOEntity entity = (EOEntity) oldEntitiesIter.next(); entity.removePropertyChangeListener(myEntityListener);
if (myEditorInput != null) { myEditorInput.getModel().removePropertyChangeListener(myModelListener); if (myEntities != null) { Iterator oldEntitiesIter = myEntities.iterator(); while (oldEntitiesIter.hasNext()) { EOEntity entity = (EOEntity) oldEntitiesIter.next(); entity.removePropertyChangeListener(myEntityListener); }
  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);  }