return processIcon;
}
};
builder.setCommandButton(new CompositeActiveComponent(spinningProgress, settingsButton));
DefaultActionGroup toolbar = new DefaultActionGroup();
usageView.addFilteringActions(toolbar);
toolbar.add(UsageGroupingRuleProviderImpl.createGroupByFileStructureAction(usageView));
toolbar.add(
new AnAction("Open Find Usages Toolwindow", "Show all usages in a separate toolwindow",
AllIcons.Toolwindows.ToolWindowFind) {
{
AnAction action = ActionManager.getInstance().getAction(IdeActions.ACTION_FIND_USAGES);
setShortcutSet(action.getShortcutSet());
}
@Override
public void actionPerformed(AnActionEvent e) {
hideHints();
popup[0].cancel();
FindUsagesManager findUsagesManager = ((FindManagerImpl) FindManager.getInstance(
usageView.getProject())).getFindUsagesManager();
findUsagesManager.findUsages(handler.getPrimaryElements(),
handler.getSecondaryElements(), handler, options, true);
}
}
);
ActionToolbar actionToolbar = ActionManager.getInstance()
.createActionToolbar(ActionPlaces.USAGE_VIEW_TOOLBAR, toolbar, true);
actionToolbar.setReservePlaceAutoPopupIcon(false);
final JComponent toolBar = actionToolbar.getComponent();
toolBar.setOpaque(false);
builder.setSettingButton(toolBar);
popup[0] = builder.createPopup();
JComponent content = popup[0].getContent();
myWidth = (int) (toolBar.getPreferredSize().getWidth() + new JLabel(
getFullTitle(usages, title, hadMoreSeparator, visibleNodes.size() - 1,
true)).getPreferredSize().getWidth() + settingsButton.getPreferredSize().getWidth());
myWidth = -1;
for (AnAction action : toolbar.getChildren(null)) {
action.unregisterCustomShortcutSet(usageView.getComponent());
action.registerCustomShortcutSet(action.getShortcutSet(), content);
}
return popup[0];