How to extend an EMF-based model with listeners for use in a GEF editor?
问题 I am creating an Eclipse RCP with a GEF editor and an EMF -based model. One thing that is mentioned about the model in the GEF Book is The model should broadcast all state changes via listeners so that the view can be updated without the model having any direct knowledge of the controller or view. In the book's example, each model element class, e.g., Person , Marriage , etc. (the example is a genealogy editor), has methods to add and remove the respective listener, e.g., for Person the are: