listeners - accepted events

In various listeners I see in the code base, the listener is tied to a contribution that defines the events to be routed to the listener. Yet the listener code seems to confirm the event to be handled - e.g. if (!EVENTS_TO_HANDLE.contains(event.getName())) { return; } In my debugging I've not yet observed an instance where a listener receives an event that it did not request in its corresponding contribution - so I'm just curious as to this construct. Thanks.

0 votes

1 answers



This is historical, in the past there was no declaration of the accepted events in the listener extension point so events were dispatched to all listeners. This is not the case anymore, now listeners receive only events for which they have registered. Note also future work in this area:

0 votes

Thank you.