use of org.eclipse.jface.action.GroupMarker in project translationstudio8 by heartsome.
the class ApplicationActionBarAdvisor method createEditMenu.
/**
* 创建编辑菜单
* @return 返回编辑菜单的 menu manager;
*/
private MenuManager createEditMenu() {
MenuManager menu = new MenuManager(Messages.getString("ts.ApplicationActionBarAdvisor.menu.edit"), // &Edit
IWorkbenchActionConstants.M_EDIT);
menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_START));
// menu.add(undoAction);
// menu.add(redoAction);
menu.add(new GroupMarker(IWorkbenchActionConstants.UNDO_EXT));
menu.add(new Separator());
menu.add(cutAction);
menu.add(copyAction);
menu.add(pasteAction);
menu.add(new GroupMarker(IWorkbenchActionConstants.CUT_EXT));
// menu.add(deleteAction);
menu.add(renameAction);
menu.add(new Separator());
menu.add(findAction);
menu.add(selectAllAction);
menu.add(new GroupMarker(IWorkbenchActionConstants.FIND_EXT));
// menu.add(new Separator());
// menu.add(preferenceAction);
menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_END));
return menu;
}
use of org.eclipse.jface.action.GroupMarker in project translationstudio8 by heartsome.
the class ApplicationActionBarAdvisor method fillCoolBar.
@Override
protected void fillCoolBar(ICoolBarManager coolBar) {
// Set up the context Menu
coolbarPopupMenuManager = new MenuManager();
coolbarPopupMenuManager.add(new ActionContributionItem(lockToolBarAction));
coolBar.setContextMenuManager(coolbarPopupMenuManager);
IMenuService menuService = (IMenuService) window.getService(IMenuService.class);
menuService.populateContributionManager(coolbarPopupMenuManager, "popup:windowCoolbarContextMenu");
coolBar.add(new GroupMarker("group.file"));
// File Group
// IToolBarManager fileToolBar = new ToolBarManager(coolBar.getStyle());
// fileToolBar.add(new Separator(IWorkbenchActionConstants.NEW_GROUP));
// fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.OPEN_EXT));
// fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.SAVE_GROUP));
// // 为了使工具栏和菜单中的图片大小不一样,重新创建新建 Action
// newAction = ActionFactory.NEW_WIZARD_DROP_DOWN.create(window);
// register(newAction);
// ImageDescriptor newImage =
// net.heartsome.cat.ts.ui.Activator.getImageDescriptor(ImageConstant.TOOL_NEW_PROJECT);
// newAction.setImageDescriptor(newImage);
// // 解决在 Windows 下图片显示错误的问题
// newAction.setDisabledImageDescriptor(newImage);
// newAction.setToolTipText(Messages.getString("ts.ApplicationActionBarAdvisor.newAction"));
// fileToolBar.add(newAction);
// saveAction = ActionFactory.SAVE.create(window);
// register(saveAction);
// saveAction.setImageDescriptor(net.heartsome.cat.ts.ui.Activator.getImageDescriptor(ImageConstant.TOOL_SAVE));
// saveAction.setToolTipText("保存");
// fileToolBar.add(saveAction);
// undoAction = ActionFactory.UNDO.create(window);
// register(undoAction);
// undoAction.setImageDescriptor(net.heartsome.cat.ts.ui.Activator.getImageDescriptor(ImageConstant.TOOL_UNDO));
// undoAction.setToolTipText("撤销");
// fileToolBar.add(undoAction);
//
// redoAction = ActionFactory.REDO.create(window);
// register(redoAction);
// redoAction.setImageDescriptor(net.heartsome.cat.ts.ui.Activator.getImageDescriptor(ImageConstant.TOOL_REDO));
// redoAction.setToolTipText("重做");
// fileToolBar.add(redoAction);
// fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.SAVE_EXT));
// fileToolBar.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
// Add to the cool bar manager
// coolBar.add(new ToolBarContributionItem(fileToolBar, IWorkbenchActionConstants.TOOLBAR_FILE));
coolBar.add(new GroupMarker("group.new.menu"));
coolBar.add(new GroupMarker("group.undoredo"));
coolBar.add(new GroupMarker("group.copySource"));
coolBar.add(new GroupMarker("group.search"));
//createToolItem(coolBar);
coolBar.add(new GroupMarker("group.findreplace"));
coolBar.add(new GroupMarker("group.completeTranslation"));
coolBar.add(new GroupMarker("group.approve"));
coolBar.add(new GroupMarker("group.addTerm"));
coolBar.add(new GroupMarker("group.preview"));
coolBar.add(new GroupMarker("group.tagoperation"));
coolBar.add(new GroupMarker("group.sourceoperation"));
coolBar.add(new GroupMarker("group.deleteTrans"));
coolBar.add(new GroupMarker("group.changeLayout"));
coolBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_EDITOR));
coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_HELP));
// Help group
// IToolBarManager helpToolBar = new ToolBarManager(coolBar.getStyle());
// helpToolBar.add(new Separator(IWorkbenchActionConstants.GROUP_HELP));
// // 按照设计文档的要求,先注释 helpSearchAction
// // helpToolBar.add(helpSearchAction);
// // Add the group for applications to contribute
// helpToolBar.add(new GroupMarker("tagoperation"));
// helpToolBar.add(new GroupMarker("pretranslation"));
//
// // Add to the cool bar manager
// coolBar.add(new ToolBarContributionItem(helpToolBar, IWorkbenchActionConstants.TOOLBAR_HELP));
//coolBar.add(createToolItem(coolBar));
}
use of org.eclipse.jface.action.GroupMarker in project cubrid-manager by CUBRID.
the class ApplicationActionBarAdvisor method fillMenuBar.
/**
* Fills the menu bar with the main menus for the window.
*
* @param menuBar the menu bar manager
*/
protected void fillMenuBar(IMenuManager menuManager) {
ActionManager manager = ActionManager.getInstance();
MenuManager helpMenu = new MenuManager(Messages.mnu_helpMneuName, IWorkbenchActionConstants.M_HELP);
helpMenu.add(manager.getAction(HelpDocumentAction.ID));
// fill in help menu
if ("ko".equals(Messages.language)) {
helpMenu.add(newFeatureAction);
}
helpMenu.add(new Separator());
helpMenu.add(reportBugAction);
helpMenu.add(new Separator());
helpMenu.add(cubridOnlineForumAction);
helpMenu.add(cubridProjectSiteAction);
helpMenu.add(new Separator());
helpMenu.add(new GroupMarker("updates"));
helpMenu.add(new Separator());
helpMenu.add(manager.getAction(ViewServerVersionAction.ID));
helpMenu.add(new Separator());
ActionContributionItem aboutActionItem = new ActionContributionItem(aboutAction);
helpMenu.add(aboutActionItem);
if (Util.isMac()) {
aboutActionItem.setVisible(false);
}
menuManager.add(helpMenu);
}
use of org.eclipse.jface.action.GroupMarker in project tdi-studio-se by Talend.
the class ApplicationActionBarAdvisor method fillMenuBar.
protected void fillMenuBar(IMenuManager menuBar) {
MenuManager fileMenu = new MenuManager(Messages.getString("ApplicationActionBarAdvisor.fileMenu"), //$NON-NLS-1$
IWorkbenchActionConstants.M_FILE);
MenuManager windowMenu = new MenuManager(Messages.getString("ApplicationActionBarAdvisor.windowMenu"), //$NON-NLS-1$
IWorkbenchActionConstants.M_WINDOW);
MenuManager helpMenu = new MenuManager(Messages.getString("ApplicationActionBarAdvisor.helpMenu"), //$NON-NLS-1$
IWorkbenchActionConstants.M_HELP);
menuBar.add(fileMenu);
menuBar.add(windowMenu);
// Add a group marker indicating where action set menus will appear.
menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
menuBar.add(helpMenu);
// File
fileMenu.add(new Separator());
fileMenu.add(ActionFactory.SAVE.create(window));
fileMenu.add(exitAction);
// Window
windowMenu.add(preferenceAction);
windowMenu.add(new ShowViewAction());
// Help
helpMenu.add(aboutAction);
}
use of org.eclipse.jface.action.GroupMarker in project eclipse.platform.text by eclipse.
the class SearchPlugin method createStandardGroups.
/**
* Creates the Search plugin standard groups in a context menu.
*
* @param menu the menu to create in
* @deprecated old search
*/
@Deprecated
public static void createStandardGroups(IMenuManager menu) {
if (!menu.isEmpty())
return;
menu.add(new Separator(IContextMenuConstants.GROUP_NEW));
menu.add(new GroupMarker(IContextMenuConstants.GROUP_GOTO));
menu.add(new GroupMarker(IContextMenuConstants.GROUP_OPEN));
menu.add(new Separator(IContextMenuConstants.GROUP_SHOW));
menu.add(new Separator(IContextMenuConstants.GROUP_BUILD));
menu.add(new Separator(IContextMenuConstants.GROUP_REORGANIZE));
menu.add(new Separator(IContextMenuConstants.GROUP_REMOVE_MATCHES));
menu.add(new GroupMarker(IContextMenuConstants.GROUP_GENERATE));
menu.add(new Separator(IContextMenuConstants.GROUP_SEARCH));
menu.add(new Separator(IContextMenuConstants.GROUP_ADDITIONS));
menu.add(new Separator(IContextMenuConstants.GROUP_VIEWER_SETUP));
menu.add(new Separator(IContextMenuConstants.GROUP_PROPERTIES));
}
Aggregations