IntelliJ Platform Plugin SDK
 
IntelliJ Platform Explorer

Listeners

Edit pageLast modified: 15 April 2024

Listeners allow plugins to subscribe to events delivered through the message bus (see Messaging infrastructure for details).

Listeners are defined at application (global) or project level.

Listener implementations must be stateless and may not implement life-cycle (e.g., Disposable). Use inspection Plugin DevKit | Code | Listener implementation implements 'Disposable' to verify (2023.3).

Declarative registration of listeners (2019.3 and later) allows achieving better performance than registering listeners from code. The advantage is because listener instances get created lazily — the first time an event is sent to the topic — and not during application startup or project opening.