void (MouseEvent e) { if (SwingUtilities.isLeftMouseButton(e) && e.getClickCount() == 2) { InternalDecoratorImpl topLevelDecorator = InternalDecoratorImpl.Companion.findTopLevelDecorator(myComponent); if (topLevelDecorator != null && !topLevelDecorator.isHeaderVisible()) { String id = topLevelDecorator.getToolWindowId(); ToolWindowManagerEx manager = ToolWindowManagerEx.getInstanceEx(myProject); ToolWindow window = manager.getToolWindow(id); if (window != null) { manager.setMaximized(window, !manager.isMaximized(window)); } } } }