code: public ElementMenuItem registerMenu(String path, String action) {
          ElementMenuItem menu = getElement(path, getDesktop().getMenubar(), ElementMenuItem.class);
          menu.setAction(action);
          return menu;
      }
docs: Register a menu.
  
  @param path Path for the menu.
  @param action Associated action for the menu.
  @return Created menu.