I need a change notification layer for the cas editor. The different parts of the ui (editor, outline view, properties view, etc.) only know the model (CAS) and how to display it, if the model is changed the views must be updated. The problem is that the views do not know each other, so they need change notification to know how the model has changed e.g. annotation was removed/added, annotation span was adjusted, etc.
I am not sure why do say this is a performance problem. A client would implement a listener interface and adds/registers
an instance of it. Then the uima code calls the listener if a change occurred.
Sure this slows the uima code a little bit, but the key point is that it only slows the code if there are registered listeners.
If there are no registered listeners the code is as fast as without change notifications.