void (@NotNull ServiceEvent e) { String toolWindowId = getToolWindowId(e.contributorClass); if (toolWindowId == null) { return; } ServiceViewItem eventRoot = ContainerUtil.find(myModel.getRoots(), root -> e.contributorClass.isInstance(root.getRootContributor())); ServiceViewContributor<?> notInitializedContributor = findNotInitializedContributor(e.contributorClass, eventRoot); boolean initialized = notInitializedContributor == null; if (!initialized && (e.type == ServiceEventListener.EventType.RESET || e.type == ServiceEventListener.EventType.UNLOAD_SYNC_RESET)) { myNotInitializedContributors.remove(notInitializedContributor); } if (eventRoot != null) { boolean show = !(eventRoot.getViewDescriptor() instanceof ServiceViewNonActivatingDescriptor) && initialized; updateToolWindow(toolWindowId, true, show); } else { Set<? extends ServiceViewContributor<?>> activeContributors = getActiveContributors(); Collection<ServiceViewContributor<?>> toolWindowContributors = myGroups.get(toolWindowId); updateToolWindow(toolWindowId, ContainerUtil.intersects(activeContributors, toolWindowContributors), false); } }