void (@NotNull AnActionEvent event, boolean flag) { Project project = event.getProject(); if (project == null) { return; } ToolWindowManager windowManager = ToolWindowManager.getInstance(project); String id=windowManager.getActiveToolWindowId(); if(id==null){ return; } ToolWindow toolWindow=windowManager.getToolWindow(id); ToolWindowType type=toolWindow.getType(); if(ToolWindowType.DOCKED==type){ toolWindow.setType(ToolWindowType.SLIDING, null); } else if(ToolWindowType.SLIDING==type){ toolWindow.setType(ToolWindowType.DOCKED, null); } }