// we're at it, add the items to their menus
for(MvwMenuItem mii : menuItems.values()){
Action action = actions.get(mii.getActionName());
mii.setAction(action);
MvwMenu menu = allMenus.get(mii.getAddToMenu());
menu.addSubItem(mii);
}
// Add the separators
for(MvwSeparator subitem: separators.values()){
MvwMenu menu = allMenus.get(subitem.getAddToMenu());
menu.addSubItem(subitem);
}
// Add the submenus to their menus
for(MvwSubMenu sub : subMenus.values()){
MvwMenu menu = allMenus.get(sub.getAddToMenu());
menu.addSubItem(sub);
}
// Build the submenus
for(MvwSubMenu sub : subMenus.values()){
sub.buildMenu();