public AnAction[] createGroupingActions(UsageView view) {
final UsageViewImpl impl = (UsageViewImpl)view;
final JComponent component = impl.getComponent();
final GroupByModuleTypeAction groupByModuleTypeAction = new GroupByModuleTypeAction(impl);
groupByModuleTypeAction.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_D, InputEvent.CTRL_DOWN_MASK)), component);
final GroupByFileStructureAction groupByFileStructureAction = new GroupByFileStructureAction(impl);
groupByFileStructureAction.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_M,
InputEvent.CTRL_DOWN_MASK)), component);
impl.scheduleDisposeOnClose(new Disposable() {
public void dispose() {
groupByModuleTypeAction.unregisterCustomShortcutSet(component);
groupByFileStructureAction.unregisterCustomShortcutSet(component);
}
});
if(view.getPresentation().isCodeUsages()) {
final GroupByUsageTypeAction groupByUsageTypeAction = new GroupByUsageTypeAction(impl);
groupByUsageTypeAction.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_T, InputEvent.CTRL_DOWN_MASK)), component);
final GroupByPackageAction groupByPackageAction = new GroupByPackageAction(impl);
groupByPackageAction.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_P, InputEvent.CTRL_DOWN_MASK)), component);
impl.scheduleDisposeOnClose(new Disposable() {
public void dispose() {
groupByUsageTypeAction.unregisterCustomShortcutSet(component);
groupByPackageAction.unregisterCustomShortcutSet(component);