public static void addActions(ContributionManager cm, IActionManager am, String[] actionIds) { for (final String id : actionIds) { if ((id == null) || (id.length() == 0)) { continue; } if (Separator.ID.equals(id)) { cm.add(new Separator()); } else if (Fill.ID.equals(id)) { cm.add(new Fill()); } else { final IAction action = am.get(id); if (action == null) { LOGGER.error("Unknown action: {}", id); } else { cm.add(action); } } } }
@Override public void fillPopupMenu(IMenuManager manager, SchemaViewer viewer) { for (String section : ORDERED_SECTIONS) { manager.add(new Separator(section)); } IMenuService service = serviceProvider.getMenuService(); service.populateContributionManager((ContributionManager) manager, getPopupMenuId()); }
protected void fillPopupMenu(IMenuManager manager) { IMenuService service = (IMenuService) editor.getServiceProvider().getMenuService(); service.populateContributionManager((ContributionManager) manager, POPUP_MENU_ID); }