Re: Does anybody want to replace base handler ?
Holger Krug <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Jul 15, 2002 at 05:06:18PM +0200, Martin Matula wrote: > > The advantage of making these checks outside of the listener is, that > > a) the listeners are called two times and b) all listeners which apply > > are put into a queue. Hence even if I would put all "if"'s also into > > the listener (what is not necessary) the additional external check > > probably would be more efficient in most case. > > For the interactive case that you are focused on I guess that preChange > events are not needed and thus the listeners are called only once. In > this case checks inside of listeners are running on a background thread > however checks inside of MDR are blocking other threads from working > with it (it is still inside the transaction). OK. I will review my code accordingly before I prepare the patch. > > > > It heavily depends on the use cases. In complicated interactive > > environments you will have *all* kinds of bitmasks you only can > > imagine. > > I don't see why this would be a good thing to do. Each view will register a listener which listens on the types of events which may change those parts of the model the view depends on. > I need to see the implementation. I don't see why they are needed by > EventNotifier. The reason I don't like them is their name. It is not > obvious from the names what the difference is between EVENTMASK_BY and > EVENTMASK_ON events is. I would even think that their meaning is > opposite. I.e. "BY" events are fired *by* the object (object is the > source), "ON" events are fired *on* object (object is either the source > or source's package/etc.). It is confusing. I have no problems neither with name changes nor with removing the constants I called EVENTMASK_BY. Decide to your pleasure after code review. -- Holger Krug [email protected]