void (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project == null || project.isDisposed()) return; ToolWindow toolWindow = e.getData(PlatformDataKeys.TOOL_WINDOW); if (toolWindow == null) return; ToolWindowManager manager = ToolWindowManager.getInstance(project); manager.setMaximized(toolWindow, !manager.isMaximized(toolWindow)); }