use of org.talend.designer.runtime.visualization.internal.ui.properties.cpu.actions.ShowCallersCalleesAction in project tdi-studio-se by Talend.
the class AbstractFilteredTree method createContextMenu.
/**
* Creates the context menu.
*/
protected void createContextMenu() {
// create actions
openAction = OpenDeclarationAction.createOpenDeclarationAction(actionBars);
copyAction = (CopyAction) actionBars.getGlobalActionHandler(ActionFactory.COPY.getId());
findAction = (FindAction) actionBars.getGlobalActionHandler(ActionFactory.FIND.getId());
focusOnFrameAction = new FocusOnAction(this);
showCallersCalleesAction = new ShowCallersCalleesAction(getViewer());
configureColumnsAction = new ConfigureColumnsAction(this);
// create menu manager
//$NON-NLS-1$
MenuManager menuMgr = new MenuManager("#PopupMenu");
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
@Override
public void menuAboutToShow(IMenuManager manager) {
focusOnFrameAction.aboutToShow();
manager.add(openAction);
manager.add(new Separator());
manager.add(copyAction);
manager.add(findAction);
manager.add(focusOnFrameAction);
manager.add(showCallersCalleesAction);
manager.add(new Separator());
manager.add(configureColumnsAction);
addMenus(manager);
}
});
// create context menu
Menu menu = menuMgr.createContextMenu(getViewer().getControl());
getViewer().getControl().setMenu(menu);
}
Aggregations