ActionToolbar (final Project project, final ActionGroup leadGroup, @Nullable final ActionGroup tailGroup, final List<? extends AnAction> extra) { DefaultActionGroup toolbarGroup = new DefaultActionGroup(); toolbarGroup.add(leadGroup); toolbarGroup.addSeparator(); toolbarGroup.add(new SelectFilteringAction(project, this)); toolbarGroup.add(new SelectGroupingAction(project, this)); final ExpandAllAction expandAllAction = new ExpandAllAction(myChangesTree); final CollapseAllAction collapseAllAction = new CollapseAllAction(myChangesTree); expandAllAction.registerCustomShortcutSet(getActiveKeymapShortcuts(IdeActions.ACTION_EXPAND_ALL), myChangesTree); collapseAllAction.registerCustomShortcutSet(getActiveKeymapShortcuts(IdeActions.ACTION_COLLAPSE_ALL), myChangesTree); toolbarGroup.add(expandAllAction); toolbarGroup.add(collapseAllAction); toolbarGroup.add(ActionManager.getInstance().getAction(VcsActions.ACTION_COPY_REVISION_NUMBER)); toolbarGroup.add(new ContextHelpAction(myHelpId)); if (tailGroup != null) { toolbarGroup.add(tailGroup); } for (AnAction anAction : extra) { toolbarGroup.add(anAction); } return ActionManager.getInstance().createActionToolbar("CommittedChangesTree", toolbarGroup, true); }