void (@NotNull ContentManagerEvent event) { if (window.isDisposed() || window.getToolWindowManager().getProject().isDisposed()) { return; } Content content = event.getContent(); if (!Content.TEMPORARY_REMOVED_KEY.get(content, false)) { SingleContentSupplier.removeSubContentsOfContent(content, false); } content.removePropertyChangeListener(propertyChangeListener); getCurrentLayout().contentRemoved(event); ensureSelectedContentVisible(); rebuild(); if (contentManager.isEmpty() && contentManager == window.getContentManager() && !Content.TEMPORARY_REMOVED_KEY.get(content, false)) { boolean removeFromStripe; if (window.isToHideOnEmptyContent()) { removeFromStripe = true; } else if (window.canCloseContents() && StatusText.getDefaultEmptyText().equals(window.getEmptyText().getText())) { removeFromStripe = false; } else { return; } window.getToolWindowManager() .hideToolWindow(window.getId(), /* hideSide = */ false, /* moveFocus = */ true, removeFromStripe, /* source = */ null); } }