RunnerLayoutUi (final @NotNull ContentManagerListener listener, final @NotNull Disposable parent) { final ContentManager mgr = getContentManager(); mgr.addContentManagerListener(listener); Disposer.register(parent, new Disposable() { @Override public void dispose() { mgr.removeContentManagerListener(listener); } }); return this; }