public void buildGroupMappings() {
    if (!myActionGroups.isEmpty()) return;
    ActionGroup mainMenu = Objects.requireNonNull((ActionGroup)myActionManager.getActionOrStub(IdeActions.GROUP_MAIN_MENU));
    ActionGroup keymapOthers = Objects.requireNonNull((ActionGroup)myActionManager.getActionOrStub("Other.KeymapGroup"));

    Map<AnAction, GroupMapping> mainGroups = new HashMap<>();
    collectActions(mainGroups, mainMenu, Collections.emptyList(), false);

    Map<AnAction, GroupMapping> otherGroups = new HashMap<>();
    collectActions(otherGroups, keymapOthers, Collections.emptyList(), true);

    myActionGroups.putAll(mainGroups);
    otherGroups.forEach(myActionGroups::putIfAbsent);
  }
public void buildGroupMappings()