@Override
  public AnAction @NotNull [] getChildren(@Nullable AnActionEvent e) {
    boolean addG2 = e == null || ActionPlaces.isMainMenuOrActionSearch(e.getPlace());
    AnAction g1 = ActionManager.getInstance().getAction(IdeActions.GROUP_WEIGHING_NEW);
    AnAction g2 = addG2 ? ActionManager.getInstance().getAction(PROJECT_OR_MODULE_GROUP_ID) : null;

    AnAction[] actions1 = g1 instanceof ActionGroup ? ((ActionGroup)g1).getChildren(e) : EMPTY_ARRAY;
    AnAction[] actions2 = g2 instanceof ActionGroup ? ((ActionGroup)g2).getChildren(e) : EMPTY_ARRAY;
    if (actions2.length == 0) return actions1;

    List<AnAction> mergedActions = new ArrayList<>(actions2.length + 1 + actions1.length);
    Collections.addAll(mergedActions, actions2);
    mergedActions.add(Separator.getInstance());
    Collections.addAll(mergedActions, actions1);
    return mergedActions.toArray(AnAction.EMPTY_ARRAY);
  }
@Override
  public AnAction @NotNull [] getChildren(@Nullable AnActionEvent e)