use of org.eclipse.jface.action.GroupMarker in project translationstudio8 by heartsome.
the class ApplicationActionBarAdvisor method createHelpMenu.
/**
* 创建帮助菜单
* @return 返回帮助菜单的 menu manager;
*/
private MenuManager createHelpMenu() {
MenuManager menu = new MenuManager(Messages.getString("ts.ApplicationActionBarAdvisor.menu.help"), IWorkbenchActionConstants.M_HELP);
// menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_START));
menu.add(helpAction);
// menu.add(helpSearchAction);
// menu.add(dynamicHelpAction);
// menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_END));
menu.add(new GroupMarker("help.keyAssist"));
menu.add(new Separator());
menu.add(new GroupMarker("help.updatePlugin"));
menu.add(new Separator());
menu.add(new GroupMarker("help.license"));
// 关于菜单需要始终显示在最底端
menu.add(new GroupMarker("group.about"));
// menu.add(aboutItem);
return menu;
}
use of org.eclipse.jface.action.GroupMarker in project translationstudio8 by heartsome.
the class ApplicationActionBarAdvisor method createFileMenu.
/**
* 创建文件菜单
* @return 返回文件菜单的 menu manager;
*/
private MenuManager createFileMenu() {
MenuManager menu = new MenuManager(Messages.getString("ts.ApplicationActionBarAdvisor.menu.file"), // &File
IWorkbenchActionConstants.M_FILE);
menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_START));
// 添加 new.ext group,这样 IDE 中定义的 Open File... 可以显示在最顶端
// menu.add(newAction);
menu.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT));
menu.add(new Separator());
menu.add(closeAction);
menu.add(closeAllAction);
menu.add(refreshAction);
// menu.add(new Separator("net.heartsome.cat.ts.ui.menu.file.separator"));
menu.add(new GroupMarker("xliff.switch"));
menu.add(new GroupMarker("rtf.switch"));
menu.add(new GroupMarker("xliff.split"));
menu.add(new Separator());
// 设置保存文件记录条数为 5 条
WorkbenchPlugin.getDefault().getPreferenceStore().setValue(IPreferenceConstants.RECENT_FILES, 5);
// 添加文件访问列表
ContributionItemFactory REOPEN_EDITORS = new //$NON-NLS-1$
ContributionItemFactory(//$NON-NLS-1$
"reopenEditors") {
/* (non-javadoc) method declared on ContributionItemFactory */
public IContributionItem create(IWorkbenchWindow window) {
if (window == null) {
throw new IllegalArgumentException();
}
return new ReopenEditorMenu(window, getId(), false);
}
};
menu.add(REOPEN_EDITORS.create(window));
menu.add(exitAction);
menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END));
return menu;
}
use of org.eclipse.jface.action.GroupMarker in project translationstudio8 by heartsome.
the class ApplicationActionBarAdvisor method fillMenuBar.
@Override
protected void fillMenuBar(IMenuManager menuBar) {
menuBar.add(createFileMenu());
menuBar.add(createEditMenu());
menuBar.add(new GroupMarker("view"));
menuBar.add(new GroupMarker("translation"));
menuBar.add(new GroupMarker("project"));
menuBar.add(new GroupMarker("database"));
menuBar.add(new GroupMarker("qa"));
menuBar.add(createToolMenu());
menuBar.add(new GroupMarker("advance"));
// menuBar.add(createAutoPluginMenu());
menuBar.add(createHelpMenu());
}
use of org.eclipse.jface.action.GroupMarker in project eclipse.platform.text by eclipse.
the class TextSearchGroup method fillContextMenu.
@Override
public void fillContextMenu(IMenuManager menu) {
MenuManager textSearchMM = new MenuManager(fMenuText, CTX_MENU_ID);
int i = 0;
for (i = 0; i < fActions.length - 1; i++) {
textSearchMM.add(fActions[i]);
}
textSearchMM.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
textSearchMM.add(new Separator());
textSearchMM.add(fActions[i]);
menu.appendToGroup(fAppendToGroup, textSearchMM);
}
use of org.eclipse.jface.action.GroupMarker in project eclipse.platform.text by eclipse.
the class SearchView method createToolBarGroups.
/**
* Creates the groups and separators for the search view's
* tool bar
*
* @param toolbar the toolbar
*/
public static void createToolBarGroups(IToolBarManager toolbar) {
toolbar.add(new Separator(IContextMenuConstants.GROUP_NEW));
toolbar.add(new GroupMarker(IContextMenuConstants.GROUP_GOTO));
toolbar.add(new GroupMarker(IContextMenuConstants.GROUP_OPEN));
toolbar.add(new Separator(IContextMenuConstants.GROUP_SHOW));
toolbar.add(new Separator(IContextMenuConstants.GROUP_BUILD));
toolbar.add(new Separator(IContextMenuConstants.GROUP_REORGANIZE));
toolbar.add(new Separator(IContextMenuConstants.GROUP_EDIT));
toolbar.add(new GroupMarker(IContextMenuConstants.GROUP_REMOVE_MATCHES));
toolbar.add(new GroupMarker(IContextMenuConstants.GROUP_GENERATE));
toolbar.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
toolbar.add(new Separator(IContextMenuConstants.GROUP_VIEWER_SETUP));
toolbar.add(new Separator(IContextMenuConstants.GROUP_PROPERTIES));
toolbar.add(new Separator(IContextMenuConstants.GROUP_SEARCH));
}
Aggregations