if ("visible".equals(actionCommnad)) {
toolWindow.setVisible(false);
} else if ("pin".equals(actionCommnad)) {
toolWindow.setAutoHide(!toolWindow.isAutoHide());
} else if ("floating".equals(actionCommnad)) {
ToolWindowType type = toolWindow.getType();
if (type == ToolWindowType.FLOATING || type == ToolWindowType.FLOATING_FREE) {
toolWindow.setType(ToolWindowType.DOCKED);
} else if (type == ToolWindowType.DOCKED || type == ToolWindowType.SLIDING) {
toolWindow.setType(descriptor.isFloatingWindow() ? ToolWindowType.FLOATING_FREE : ToolWindowType.FLOATING);
}
} else if ("undock".equals(actionCommnad)) {
ToolWindowType type = toolWindow.getType();
if (type == ToolWindowType.DOCKED) {
toolWindow.setType(ToolWindowType.SLIDING);
} else if (type == ToolWindowType.SLIDING) {
toolWindow.setType(ToolWindowType.DOCKED);
}