private JComponent toUsageViewToolbar(final DefaultActionGroup group) {
   ActionToolbar actionToolbar =
       ActionManager.getInstance()
           .createActionToolbar(ActionPlaces.USAGE_VIEW_TOOLBAR, group, false);
   actionToolbar.setTargetComponent(myRootPanel);
   return actionToolbar.getComponent();
 }
  private AnAction[] createActions() {
    final TreeExpander treeExpander =
        new TreeExpander() {
          @Override
          public void expandAll() {
            UsageViewImpl.this.expandAll();
          }

          @Override
          public boolean canExpand() {
            return true;
          }

          @Override
          public void collapseAll() {
            UsageViewImpl.this.collapseAll();
          }

          @Override
          public boolean canCollapse() {
            return true;
          }
        };

    CommonActionsManager actionsManager = CommonActionsManager.getInstance();

    myTextFileExporter = new ExporterToTextFile(this);

    final JComponent component = getComponent();

    final AnAction expandAllAction = actionsManager.createExpandAllAction(treeExpander, component);
    final AnAction collapseAllAction =
        actionsManager.createCollapseAllAction(treeExpander, component);

    scheduleDisposeOnClose(
        new Disposable() {
          @Override
          public void dispose() {
            collapseAllAction.unregisterCustomShortcutSet(component);
            expandAllAction.unregisterCustomShortcutSet(component);
          }
        });

    return new AnAction[] {
      canPerformReRun() ? new ReRunAction() : null,
      new CloseAction(),
      ActionManager.getInstance().getAction("PinToolwindowTab"),
      createRecentFindUsagesAction(),
      expandAllAction,
      collapseAllAction,
      actionsManager.createPrevOccurenceAction(myRootPanel),
      actionsManager.createNextOccurenceAction(myRootPanel),
      actionsManager.installAutoscrollToSourceHandler(
          myProject, myTree, new MyAutoScrollToSourceOptionProvider()),
      actionsManager.createExportToTextFileAction(myTextFileExporter),
      actionsManager.createHelpAction(HELP_ID)
    };
  }
 private AnAction createRecentFindUsagesAction() {
   AnAction action = ActionManager.getInstance().getAction(SHOW_RECENT_FIND_USAGES_ACTION_ID);
   action.registerCustomShortcutSet(action.getShortcutSet(), getComponent());
   return action;
 }