void (@NotNull EventType type) { for (DiffViewerListener listener : myListeners) { switch (type) { case INIT -> listener.onInit(); case DISPOSE -> listener.onDispose(); case BEFORE_REDIFF -> listener.onBeforeRediff(); case AFTER_REDIFF -> listener.onAfterRediff(); case REDIFF_ABORTED -> listener.onRediffAborted(); } } }