void (boolean forced, @NotNull List<? extends AnAction> newVisibleActions) { myListeners.getMulticaster().actionsUpdated(); if (forced || canUpdateActions(newVisibleActions)) { 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, getLayoutPolicy() == AUTO_LAYOUT_POLICY && myOrientation == SwingConstants.HORIZONTAL); myPresentationFactory.resetNeedRebuild(); if (!skipSizeAdjustments) { Dimension availSize = compForSize.getSize(); Dimension newSize = compForSize.getPreferredSize(); adjustContainerWindowSize(fullReset, availSize, oldSize, newSize); } compForSize.revalidate(); compForSize.repaint(); } }