Actually, with SDK 5.5, it's even simpler that I thought initially. You can define your own menu with extension vsphere.core.menus.solutionMenus.
In SDK 5.1 the menu is laid out for you automatically and the platform creates a sub-menu if there are too many actions.