/** * Convenience method to add the action installed under the given actionID to the * specified group of the menu. * * @param menu the menu manager * @param group the group to which to add the action * @param actionID the ID of the new action */ protected void addAction(IMenuManager menu, String group, String actionID) { IAction action= getAction(actionID); if (action != null) { if (action instanceof IUpdate) ((IUpdate) action).update(); if (action.isEnabled()) { IMenuManager subMenu= menu.findMenuUsingPath(group); if (subMenu != null) subMenu.add(action); else menu.appendToGroup(group, action); } } }
/** * Convenience method to add the action installed under the given actionID to the * specified group of the menu. * * @param menu the menu manager * @param group the group to which to add the action * @param actionID the ID of the new action */ protected void addAction(IMenuManager menu, String group, String actionID) { IAction action= getAction(actionID); if (action != null) { if (action instanceof IUpdate) ((IUpdate) action).update(); if (action.isEnabled()) { IMenuManager subMenu= menu.findMenuUsingPath(group); if (subMenu != null) subMenu.add(action); else menu.appendToGroup(group, action); } } }
/** * Convenience method to add the action installed under the given actionID to the * specified group of the menu. * * @param menu the menu manager * @param group the group to which to add the action * @param actionID the ID of the new action */ protected void addAction(IMenuManager menu, String group, String actionID) { IAction action= getAction(actionID); if (action != null) { if (action instanceof IUpdate) ((IUpdate) action).update(); if (action.isEnabled()) { IMenuManager subMenu= menu.findMenuUsingPath(group); if (subMenu != null) subMenu.add(action); else menu.appendToGroup(group, action); } } }