ActionToolbar () { final DefaultActionGroup actionGroup = new DefaultActionGroup(); actionGroup.add(new MyRefreshAction(myTree)); if (isToShowAutoScrollButton()) { actionGroup.add(myAutoScrollToSourceHandler.createToggleAction()); } if (isToShowPreviewButton()) { actionGroup.add(new ToggleAction(UsageViewBundle.message("preview.usages.action.text"), LangBundle.message("action.preview.description"), AllIcons.Actions.PreviewDetails) { @Override public boolean isSelected(@NotNull AnActionEvent e) { return isPreview(); } @Override public @NotNull ActionUpdateThread getActionUpdateThread() { return ActionUpdateThread.EDT; } @Override public void setSelected(@NotNull AnActionEvent e, boolean state) { setPreview(state); layoutPanel(); } }); } ActionManager actionManager = ActionManager.getInstance(); actionGroup.add(actionManager.getAction(IdeActions.ACTION_EXPAND_ALL)); actionGroup.add(actionManager.getAction(IdeActions.ACTION_COLLAPSE_ALL)); actionGroup.addSeparator(); myProvider.registerExtraPanelActions(actionGroup, myBuilder); actionGroup.add(CommonActionsManager.getInstance().createExportToTextFileAction(new SliceToTextFileExporter(myBuilder, UsageViewSettings.getInstance()))); //actionGroup.add(new ContextHelpAction(HELP_ID)); return ActionManager.getInstance().createActionToolbar(ActionPlaces.TYPE_HIERARCHY_VIEW_TOOLBAR, actionGroup, false); }