void (@NotNull ToolWindow toolWindow) { if (ExperimentalUI.isNewUI()) { myToolWindow = toolWindow; myContentManagerListener = new ContentManagerListener() { @Override public void selectionChanged(@NotNull ContentManagerEvent event) { boolean selected = ContentManagerEvent.ContentOperation.add == event.getOperation(); if (selected && event.getContent().getComponent() == InspectionResultsView.this) { setAdditionalGearActions(); } } }; myToolWindow.getContentManager().addContentManagerListener(myContentManagerListener); setAdditionalGearActions(); } }