boolean () { boolean hasToolbarContent = false; for (Map.Entry<GridImpl, TopToolbarWrappers> entry : myCommonActionsPlaceholder.entrySet()) { Wrapper leftPlaceHolder = entry.getValue().left; Wrapper middlePlaceHolder = entry.getValue().middle; Wrapper rightPlaceHolder = entry.getValue().right; TopToolbarContextActions topToolbarContextActions = myContextActions.get(entry.getKey()); DefaultActionGroup leftGroupToBuild = new DefaultActionGroupWithDelegate(myTopLeftActions); if (myTopLeftActionsVisible) { leftGroupToBuild.addAll(myTopLeftActions); } final AnAction[] leftActions = leftGroupToBuild.getChildren(null); if (topToolbarContextActions == null || !Arrays.equals(leftActions, topToolbarContextActions.left)) { setActions(leftPlaceHolder, myTopLeftActionsPlace, leftGroupToBuild); } DefaultActionGroup middleGroupToBuild = new DefaultActionGroup(); middleGroupToBuild.addAll(myTopMiddleActions); final AnAction[] middleActions = middleGroupToBuild.getChildren(null); if (topToolbarContextActions == null || !Arrays.equals(middleActions, topToolbarContextActions.middle)) { setActions(middlePlaceHolder, myTopMiddleActionsPlace, middleGroupToBuild); } DefaultActionGroup rightGroupToBuild = new DefaultActionGroup(); rightGroupToBuild.addAll(myTopRightActions); final AnAction[] rightActions = rightGroupToBuild.getChildren(null); if (topToolbarContextActions == null || !Arrays.equals(rightActions, topToolbarContextActions.right)) { setActions(rightPlaceHolder, myTopRightActionsPlace, rightGroupToBuild); } myContextActions.put(entry.getKey(), new TopToolbarContextActions(leftActions, middleActions, rightActions)); if (leftGroupToBuild.getChildrenCount() > 0 || rightGroupToBuild.getChildrenCount() > 0) { hasToolbarContent = true; } } return hasToolbarContent; }