@Override
  public AnAction @NotNull [] createGroupingActions(@NotNull UsageView view) {
    ActionManager actionManager = ActionManager.getInstance();
    AnAction groupByModuleTypeAction = supportsModuleRule() ? actionManager.getAction("UsageGrouping.Module") : null;
    AnAction flattenModulesAction = supportsModuleRule() ? actionManager.getAction("UsageGrouping.FlattenModules") : null;

    AnAction groupByFileStructureAction = actionManager.getAction("UsageGrouping.FileStructure");
    AnAction groupByDirectoryStructureAction = ActionManager.getInstance().getAction("UsageGrouping.DirectoryStructure");

    AnAction groupByScopeAction = supportsScopesRule() ? actionManager.getAction("UsageGrouping.Scope") : null;

    AnAction groupByPackageAction = actionManager.getAction(DirectoryGroupingRule.getInstance(((UsageViewImpl)view).getProject()).getGroupingActionId());

    ArrayList<AnAction> result = new ArrayList<>();

    if (view.getPresentation().isUsageTypeFilteringAvailable()) {
      AnAction groupByUsageTypeAction = actionManager.getAction("UsageGrouping.UsageType");

      ContainerUtil.addIfNotNull(result, groupByUsageTypeAction);
      ContainerUtil.addIfNotNull(result, groupByScopeAction);
      ContainerUtil.addIfNotNull(result, groupByModuleTypeAction);
      ContainerUtil.addIfNotNull(result, flattenModulesAction);
      ContainerUtil.addIfNotNull(result, groupByPackageAction);
      ContainerUtil.addIfNotNull(result, groupByDirectoryStructureAction);
      ContainerUtil.addIfNotNull(result, groupByFileStructureAction);
    }
    else {
      ContainerUtil.addIfNotNull(result, groupByScopeAction);
      ContainerUtil.addIfNotNull(result, groupByModuleTypeAction);
      ContainerUtil.addIfNotNull(result, flattenModulesAction);
      ContainerUtil.addIfNotNull(result, groupByPackageAction);
      ContainerUtil.addIfNotNull(result, groupByDirectoryStructureAction);
    }
    return result.toArray(AnAction.EMPTY_ARRAY);
  }
@Override
  public AnAction @NotNull [] createGroupingActions(@NotNull UsageView view)