protected void actionsUpdated(boolean forced, @NotNull List<? extends AnAction> newVisibleActions) {
    myListeners.getMulticaster().actionsUpdated();
    if (!forced && !myPresentationFactory.isNeedRebuild()) {
      if (newVisibleActions.equals(myVisibleActions)) return;
      if (replaceButtonsForNewActionInstances(newVisibleActions)) return;
    }
    myForcedUpdateRequested = false;
    myCachedImage = null;
    boolean fullReset = newVisibleActions.isEmpty() || myVisibleActions.isEmpty();
    myVisibleActions = newVisibleActions;

    boolean skipSizeAdjustments = mySkipWindowAdjustments;
    Component compForSize = guessBestParentForSizeAdjustment();
    Dimension oldSize = skipSizeAdjustments ? null : compForSize.getPreferredSize();

    removeAll();
    mySecondaryActions.removeAll();
    mySecondaryActionsButton = null;
    fillToolBar(myVisibleActions, myLayoutSecondaryActions && myOrientation == SwingConstants.HORIZONTAL);
    myPresentationFactory.resetNeedRebuild();

    if (!skipSizeAdjustments) {
      Dimension availSize = compForSize.getSize();
      Dimension newSize = compForSize.getPreferredSize();
      adjustContainerWindowSize(fullReset, availSize, oldSize, newSize);
    }

    compForSize.revalidate();
    compForSize.repaint();
  }
protected void actionsUpdated(boolean forced, @NotNull List<? extends AnAction> newVisibleActions)