void (@NotNull ToolWindow toolWindow) { myTabs = new JBRunnerTabs(myProject, PythonPluginDisposable.getInstance(myProject)); myTabs.setDataProvider(dataId -> { if (PlatformCoreDataKeys.HELP_ID.is(dataId)) { return HELP_ID; } return null; }); myTabs.getPresentation().setEmptyText(PyBundle.message("debugger.data.view.empty.text")); myTabs.setPopupGroup(new DefaultActionGroup(new ColoredAction()), ActionPlaces.UNKNOWN, true); myTabs.setTabDraggingEnabled(true); final Content content = ContentFactory.getInstance().createContent(myTabs, PyBundle.message("debugger.data.view.data"), false); content.setCloseable(true); toolWindow.getContentManager().addContent(content); myProject.getMessageBus().connect().subscribe(ToolWindowManagerListener.TOPIC, new ToolWindowManagerListener() { @Override public void stateChanged(@NotNull ToolWindowManager toolWindowManager) { ToolWindow window = toolWindowManager.getToolWindow(DATA_VIEWER_ID); if (window == null) { return; } if (toolWindow.isAvailable() && toolWindow.getType().equals(ToolWindowType.FLOATING) && !toolWindow.isVisible()) { toolWindow.setShowStripeButton(false); myTabs.removeAllTabs(); } } }); }