private static boolean hideAllToolWindows(@NotNull ToolWindowManagerEx manager) {
    // to clear windows stack
    manager.clearSideStack();

    boolean hasVisible = false;
    for (ToolWindow toolWindow : manager.getToolWindows()) {
      if (toolWindow.isVisible()) {
        toolWindow.hide();
        hasVisible = true;
      }
    }
    return hasVisible;
  }
private static boolean hideAllToolWindows(@NotNull ToolWindowManagerEx manager)