void (@NotNull AnActionEvent e, boolean state) { Project project = e.getProject(); if (project == null) { return; } ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project); String id = toolWindowManager.getActiveToolWindowId(); if (id == null) { return; } setSelected(toolWindowManager.getToolWindow(id), state); }