void (String toolWindowId) { myActiveToolWindowIds.remove(toolWindowId); myGroups.remove(toolWindowId); for (ServiceViewContentHolder holder : myContentHolders) { if (holder.toolWindowId.equals(toolWindowId)) { myContentHolders.remove(holder); break; } } ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(myProject); toolWindowManager.invokeLater(() -> { if (myProject.isDisposed() || myProject.isDefault()) return; ToolWindow toolWindow = toolWindowManager.getToolWindow(toolWindowId); if (toolWindow != null) { toolWindow.remove(); } }); }