void (@NotNull ContentManagerEvent event) { Content content = event.getContent(); ServiceView serviceView = getServiceView(content); if (serviceView != null && !isMainView(serviceView)) { serviceView.setAutoScrollToSourceHandler(myAutoScrollToSourceHandler); myModelFilter.addFilter(serviceView.getModel().getFilter()); myContentHolder.processAllModels(ServiceViewModel::filtersChanged); serviceView.getModel().addModelListener(() -> { if (serviceView.getModel().getRoots().isEmpty()) { AppUIExecutor.onUiThread().expireWith(myContentManager).submit(() -> myContentManager.removeContent(content, true)); } }); } if (myContentManager.getContentCount() > 1) { Content mainContent = getMainContent(myContentManager); if (mainContent != null) { mainContent.setDisplayName(ExecutionBundle.message("service.view.all.services")); } } }