void (@Nullable List<? extends AnAction> viewerActions) { myToolbarGroup.removeAll(); boolean oldToolbar = !myIsNewToolbar; List<AnAction> navigationActions = new ArrayList<>(getNavigationActions()); if (oldToolbar) { navigationActions.add(new MyChangeDiffToolComboBoxAction()); } else { myRightToolbarGroup.add(new MyDiffToolChooser()); } DiffUtil.addActionBlock(myToolbarGroup, navigationActions); if (oldToolbar) { DiffUtil.addActionBlock(myToolbarGroup, viewerActions, true); } else { DiffUtil.addActionBlock(myRightToolbarGroup, viewerActions, false); } List<AnAction> requestContextActions = myActiveRequest.getUserData(DiffUserDataKeys.CONTEXT_ACTIONS); DiffUtil.addActionBlock(myToolbarGroup, requestContextActions); List<AnAction> contextActions = myContext.getUserData(DiffUserDataKeys.CONTEXT_ACTIONS); DiffUtil.addActionBlock(myToolbarGroup, contextActions); if (oldToolbar) { DiffUtil.addActionBlock(myToolbarGroup, new ShowInExternalToolActionGroup(), ActionManager.getInstance().getAction(IdeActions.ACTION_CONTEXT_HELP)); } if (SystemInfo.isMac) { // collect touchbar actions myTouchbarActionGroup.removeAll(); myTouchbarActionGroup.addAll( new MyPrevDifferenceAction(), new MyNextDifferenceAction(), new OpenInEditorAction(), Separator.getInstance(), new MyPrevChangeAction(), new MyNextChangeAction() ); if (SHOW_VIEWER_ACTIONS_IN_TOUCHBAR && viewerActions != null) { myTouchbarActionGroup.addAll(viewerActions); } } }