本文整理汇总了Java中org.eclipse.jface.action.IMenuManager.appendToGroup方法的典型用法代码示例。如果您正苦于以下问题:Java IMenuManager.appendToGroup方法的具体用法?Java IMenuManager.appendToGroup怎么用?Java IMenuManager.appendToGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.action.IMenuManager
的用法示例。
在下文中一共展示了IMenuManager.appendToGroup方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fillContextMenu
import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
@Override
public void fillContextMenu(final IMenuManager menu) {
// {@link N4JSProjectActionGroup} does enablement-logic
// on its own, thus always invoke it here
projectGroup.fillContextMenu(menu);
// Only delegate to {@link N4JSWorkingSetActionProvider},
// if the current selection contains working sets.
if (selectionContainsWorkingSet) {
workingSetActionProvider.fillContextMenu(menu);
}
if (assignWorkingSetsAction.isEnabled()) {
menu.appendToGroup(IContextMenuConstants.GROUP_BUILD, assignWorkingSetsAction);
}
}
示例2: fillContextMenu
import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
@Override
public void fillContextMenu(final IMenuManager menu) {
super.fillContextMenu(menu);
// If disabled, do not contribute
if (!enableContribution) {
return;
}
if (openAction.isEnabled() && enableOpenInContextMenu)
menu.appendToGroup(IContextMenuConstants.GROUP_BUILD, openAction);
if (closeAction.isEnabled())
menu.appendToGroup(IContextMenuConstants.GROUP_BUILD, closeAction);
if (closeUnrelatedAction.isEnabled()
&& areOnlyProjectsSelected(closeUnrelatedAction.getStructuredSelection()))
menu.appendToGroup(IContextMenuConstants.GROUP_BUILD, closeUnrelatedAction);
}
示例3: contributeToMenu
import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
@Override
public void contributeToMenu(IMenuManager menu) {
super.contributeToMenu(menu);
IMenuManager editMenu= menu.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
if (editMenu != null) {
editMenu.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, fContentAssist);
}
}
示例4: buildContextMenu
import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
public void buildContextMenu(IMenuManager menu) {
GEFActionConstants.addStandardActionGroups(menu);
menu.appendToGroup(GEFActionConstants.GROUP_UNDO, getAction(ActionFactory.UNDO.getId()));
menu.appendToGroup(GEFActionConstants.GROUP_UNDO, getAction(ActionFactory.REDO.getId()));
menu.appendToGroup(GEFActionConstants.GROUP_EDIT, getAction(ActionFactory.DELETE.getId()));
menu.appendToGroup(GEFActionConstants.GROUP_EDIT, getAction(ActionIdConstants.MODIFY_ACTION_ID));
IAction saveAction = getAction(ActionFactory.SAVE.getId());
saveAction.setImageDescriptor(Activator.getImageDescriptor(Activator.IMAGE_SAVE));
menu.appendToGroup(GEFActionConstants.GROUP_SAVE, saveAction);
menu.appendToGroup(GEFActionConstants.MB_ADDITIONS, createExportMenuManager());
menu.appendToGroup(GEFActionConstants.MB_ADDITIONS, getAction(ActionIdConstants.IMPORT_DATABASE_ACTION_ID));
menu.appendToGroup(GEFActionConstants.MB_ADDITIONS, getAction(ActionIdConstants.CHANGE_DATABASE_ACTION_ID));
}
示例5: fillContextMenu
import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
@Override
public void fillContextMenu(final IMenuManager menu) {
super.fillContextMenu(menu);
final ISelection selection = getContext().getSelection();
if (selection instanceof IStructuredSelection) {
if (canEnable((IStructuredSelection) selection)) {
final MenuManager newMenu = new MenuManager("Ne&w");
menu.appendToGroup(IContextMenuConstants.GROUP_NEW, newMenu);
newMenu.add(getNewWizardMenu());
}
}
}
示例6: buildContextMenu
import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
@Override
public void buildContextMenu(IMenuManager menu) {
GEFActionConstants.addStandardActionGroups(menu);
IAction rAction;
rAction = getActionRegistry().getAction("OSETS_FREFRESH_COMMANDS");
if (rAction != null) {
menu.appendToGroup(GEFActionConstants.MB_ADDITIONS, rAction);
}
rAction = getActionRegistry().getAction("OSETS_DREFRESH_COMMANDS");
if (rAction != null) {
menu.appendToGroup(GEFActionConstants.MB_ADDITIONS, rAction);
}
rAction = getActionRegistry().getAction("OSETS_CREFRESH_COMMANDS");
if (rAction != null) {
menu.appendToGroup(GEFActionConstants.MB_ADDITIONS, rAction);
}
IAction eAction;
eAction = getActionRegistry().getAction("OSETS_EXPORT_COMMANDS");
menu.appendToGroup(GEFActionConstants.MB_ADDITIONS, eAction);
IAction action;
action = getActionRegistry().getAction("OSETS_COMMANDS");
menu.appendToGroup(GEFActionConstants.MB_ADDITIONS, action);
IAction cAction;
cAction = getActionRegistry().getAction("OSETS_CLEAR_COMMANDS");
menu.appendToGroup(GEFActionConstants.MB_ADDITIONS, cAction);
IAction uAction;
uAction = getActionRegistry().getAction("OSETS_UID_COMMANDS");
menu.appendToGroup(GEFActionConstants.MB_ADDITIONS, uAction);
IAction aAction;
aAction = getActionRegistry().getAction("OSETS_API_COMMANDS");
menu.appendToGroup(GEFActionConstants.MB_ADDITIONS, aAction);
IAction iAction;
iAction = getActionRegistry().getAction("OSETS_INT_COMMANDS");
menu.appendToGroup(GEFActionConstants.MB_ADDITIONS, iAction);
}
示例7: fillContextMenu
import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
@Override
public void fillContextMenu(IMenuManager menu) {
menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, new Separator(GROUP_MANAGE));
menu.appendToGroup(GROUP_MANAGE, hideAction);
super.fillContextMenu(menu);
}
示例8: fillContextMenu
import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
@Override
public void fillContextMenu(IMenuManager menu) {
if (openAction.isEnabled()) {
menu.appendToGroup(ICommonMenuConstants.GROUP_OPEN, openAction);
}
}
示例9: buildContextMenu
import org.eclipse.jface.action.IMenuManager; //导入方法依赖的package包/类
/**
* Called when the context menu is about to show. Actions, whose state is
* enabled, will appear in the context menu.
*/
@Override
public void buildContextMenu(IMenuManager menu) {
// Add standard action groups to the menu
GEFActionConstants.addStandardActionGroups(menu);
IAction[] actions = new IAction[4];
actions[0] = getAction(Constants.SUBJOB_CREATE);
actions[1] = getAction(Constants.SUBJOB_OPEN);
actions[2] = getAction(Constants.SUBJOB_UPDATE);
actions[3] = getAction(Constants.SUBJOB_TRACKING);
SubMenuAction subJobMenu=new SubMenuAction( actions, Constants.SUBJOB_ACTION, Constants.SUBJOB_ACTION_ToolTip,true); // Add actions to the menu
IAction[] watcherAction = new IAction[2];
watcherAction[0] = getAction(Constants.ADD_WATCH_POINT_ID);
watcherAction[1] = getAction(Constants.REMOVE_WATCH_POINT_ID);
WatcherMenuAction watcherMenu = new WatcherMenuAction(watcherAction, Constants.WATCHER_ACTION,Constants.WATCHER_ACTION_TEXT, true); //action to add watch points
IAction[] viewDataActions = new IAction[2];
viewDataActions[0] = getAction(Constants.CURRENT_VIEW_DATA_ID);
viewDataActions[1] = getAction(Constants.WATCH_RECORD_ID);
ViewDataActionMenu viewDataActionMenu = new ViewDataActionMenu(viewDataActions, "View Data", "View Data", true);
//WatcherMenuAction viewDataActionMenu = new WatcherMenuAction(viewDataActions, Constants.WATCHER_ACTION,Constants.WATCHER_ACTION_TEXT, true); //action to add watch points
//IAction actionWatchRecords = getAction(Constants.WATCH_RECORD_ID);// action to view debug data
IAction componentHelpAction=getAction(Constants.HELP_ID);
IAction componentPropertiesAction=getAction(Constants.COMPONENT_PROPERTIES_ID);
menu.appendToGroup(GEFActionConstants.GROUP_UNDO, // target group id
getAction(ActionFactory.UNDO.getId())); // action to add
menu.appendToGroup(GEFActionConstants.GROUP_UNDO, getAction(ActionFactory.REDO.getId()));
menu.appendToGroup(GEFActionConstants.GROUP_EDIT, getAction(ActionFactory.DELETE.getId()));
menu.appendToGroup(GEFActionConstants.GROUP_EDIT, getAction(ActionFactory.SAVE.getId()));
menu.appendToGroup(GEFActionConstants.GROUP_COPY, getAction(ActionFactory.CUT.getId()));
menu.appendToGroup(GEFActionConstants.GROUP_COPY, getAction(ActionFactory.COPY.getId()));
menu.appendToGroup(GEFActionConstants.GROUP_COPY, getAction(ActionFactory.PASTE.getId()));
menu.appendToGroup(GEFActionConstants.GROUP_REST, subJobMenu);
menu.appendToGroup(GEFActionConstants.GROUP_REST, getAction(Constants.PROPAGATE));
menu.appendToGroup(GEFActionConstants.GROUP_REST, getAction(Constants.COMMENT_BOX));
menu.appendToGroup(GEFActionConstants.GROUP_REST, getAction(Constants.GRAPH_PROPERTY));
menu.appendToGroup(GEFActionConstants.GROUP_REST, watcherMenu);
//menu.appendToGroup(GEFActionConstants.GROUP_REST, actionWatchRecords);
menu.appendToGroup(GEFActionConstants.GROUP_REST, viewDataActionMenu);
menu.appendToGroup(GEFActionConstants.GROUP_REST,componentPropertiesAction);
menu.appendToGroup(GEFActionConstants.GROUP_REST, componentHelpAction);
if(subJobMenu.getActiveOperationCount()== 0)
subJobMenu.setEnabled(false);
if(watcherMenu.getActiveOperationCount()== 0){
watcherMenu.setEnabled(false);
}
if(viewDataActionMenu.getActiveOperationCount() == 0){
viewDataActionMenu.setEnabled(false);
}
}