This submenu is defined in a XUL fragment as the menuitem was. Each widget can be assigned a keystroke for instant access. As I described, the last option on the menu would be a customise option that would bring up a dialog that allows you to customise your add ins. One can define the order that they appear in the menu, what their activation keystroke is, etc. One can also define the behaviour of the toolbar button, single fast click, right click etc.
Widgets can also place a regular menu item if they wish.
For instance, if you had a specialized print button, you may wish to add it to the File menu. Some widgets may require specialised customisation. Menu items are root elements in the tree, items with submenus have subitems in the tree. One can manipulate them, move them up and down, rename them, etc. See the docs at Mozilla.org , they're what I use for my inspiration.