use of org.eclipse.jface.action.MenuManager in project tmdm-studio-se by Talend.
the class DataModelMainPage method hookContextMenu.
private void hookContextMenu() {
menuMgr = new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
DataModelMainPage.this.fillContextMenu(manager, false);
}
});
Menu menu = menuMgr.createContextMenu(viewer.getControl());
viewer.getControl().setMenu(menu);
}
use of org.eclipse.jface.action.MenuManager in project tmdm-studio-se by Talend.
the class StoredProcedureMainPage method hookContextMenu.
private void hookContextMenu() {
MenuManager menuMgr = new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
manager.add(new ResultsViewAction(StoredProcedureMainPage.this.getSite().getShell(), StoredProcedureMainPage.this.resultsViewer));
}
});
Menu menu = menuMgr.createContextMenu(resultsViewer.getControl());
resultsViewer.getControl().setMenu(menu);
getSite().registerContextMenu(menuMgr, resultsViewer);
}
use of org.eclipse.jface.action.MenuManager in project tmdm-studio-se by Talend.
the class ViewBrowserMainPage method hookContextMenu.
private void hookContextMenu() {
MenuManager menuMgr = new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
manager.add(new DOMViewAction(ViewBrowserMainPage.this.getSite().getShell(), ViewBrowserMainPage.this.resultsViewer));
}
});
Menu menu = menuMgr.createContextMenu(resultsViewer.getControl());
resultsViewer.getControl().setMenu(menu);
getSite().registerContextMenu(menuMgr, resultsViewer);
}
use of org.eclipse.jface.action.MenuManager 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.MenuManager 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);
}
Aggregations