use of org.eclipse.jface.action.GroupMarker in project core by jcryptool.
the class ApplicationActionBarAdvisor method fillCoolBar.
@Override
protected void fillCoolBar(ICoolBarManager coolBar) {
// ToolBar File & Additions
IToolBarManager fileToolBar = new ToolBarManager(coolBar.getStyle());
IServiceLocator serviceLocator = PlatformUI.getWorkbench();
fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.FILE_START));
fileToolBar.add(createContributionItem(serviceLocator, null, IWorkbenchCommandConstants.FILE_SAVE));
fileToolBar.add(createContributionItem(serviceLocator, null, IWorkbenchCommandConstants.FILE_SAVE_ALL));
fileToolBar.add(createContributionItem(serviceLocator, null, IWorkbenchCommandConstants.FILE_PRINT));
fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.FILE_END));
fileToolBar.add(new Separator());
fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
// $NON-NLS-1$
coolBar.add(new ToolBarContributionItem(fileToolBar, CorePlugin.PLUGIN_ID + ".toolbar"));
// ToolBar Help
IToolBarManager helpToolBar = new ToolBarManager(coolBar.getStyle());
// $NON-NLS-1$
coolBar.add(new ToolBarContributionItem(helpToolBar, CorePlugin.PLUGIN_ID + ".helpToolBar"));
// CoolBar Context Menu
// $NON-NLS-1$
MenuManager coolBarContextMenuManager = new MenuManager(null, CorePlugin.PLUGIN_ID + ".contextMenu");
coolBar.setContextMenuManager(coolBarContextMenuManager);
coolBarContextMenuManager.add(createContributionItem(serviceLocator, null, IWorkbenchCommandConstants.WINDOW_LOCK_TOOLBAR));
coolBarContextMenuManager.add(createContributionItem(serviceLocator, null, IWorkbenchCommandConstants.WINDOW_CUSTOMIZE_PERSPECTIVE));
coolBarContextMenuManager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
}
use of org.eclipse.jface.action.GroupMarker in project tmdm-studio-se by Talend.
the class DataClusterDialog method hookContextMenu.
private void hookContextMenu() {
MenuManager menuMgr = new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, new NewItemAction(site.getShell()));
}
});
Menu menu = menuMgr.createContextMenu(clusterComposite.getResultsViewer().getControl());
clusterComposite.getResultsViewer().getControl().setMenu(menu);
}
use of org.eclipse.jface.action.GroupMarker in project tmdm-studio-se by Talend.
the class ItemsTrashBrowserMainPage method hookContextMenu.
private void hookContextMenu() {
MenuManager menuMgr = new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
// ItemsTrashBrowserMainPage.this.fillContextMenu(manager);
manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, new RestoreAction(ItemsTrashBrowserMainPage.this.getSite().getShell(), ItemsTrashBrowserMainPage.this.resultsViewer));
manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, new RemoveAction(ItemsTrashBrowserMainPage.this.getSite().getShell(), ItemsTrashBrowserMainPage.this.resultsViewer));
}
});
Menu menu = menuMgr.createContextMenu(resultsViewer.getControl());
resultsViewer.getControl().setMenu(menu);
getSite().registerContextMenu(menuMgr, resultsViewer);
}
use of org.eclipse.jface.action.GroupMarker in project tmdm-studio-se by Talend.
the class RoutingEngineV2BrowserMainPage method hookContextMenu.
private void hookContextMenu() {
MenuManager menuMgr = new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, new EditItemAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(), RoutingEngineV2BrowserMainPage.this.resultsViewer));
manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, new DeleteItemsAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(), RoutingEngineV2BrowserMainPage.this, RoutingEngineV2BrowserMainPage.this.resultsViewer));
manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, new ExecuteRoutingOrdersAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(), RoutingEngineV2BrowserMainPage.this, RoutingEngineV2BrowserMainPage.this.resultsViewer, true));
manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, new ExecuteRoutingOrdersAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(), RoutingEngineV2BrowserMainPage.this, // asynchronously
RoutingEngineV2BrowserMainPage.this.resultsViewer, // asynchronously
false));
}
});
Menu menu = menuMgr.createContextMenu(resultsViewer.getControl());
resultsViewer.getControl().setMenu(menu);
getSite().registerContextMenu(menuMgr, resultsViewer);
}
use of org.eclipse.jface.action.GroupMarker in project translationstudio8 by heartsome.
the class ApplicationActionBarAdvisor method createToolMenu.
/**
* 创建工具菜单
* @return 返回工具菜单的 menu manager;
*/
private MenuManager createToolMenu() {
MenuManager menu = new MenuManager(Messages.getString("ts.ApplicationActionBarAdvisor.menu.tool"), // &Tool
"net.heartsome.cat.ts.ui.menu.tool");
menu.add(new GroupMarker("pluginConfigure"));
menu.add(new GroupMarker("preference.groupMarker"));
// menu.add(preferenceAction);
return menu;
}
Aggregations