use of org.talend.designer.runtime.visualization.internal.actions.ConfigureColumnsAction 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);
}
use of org.talend.designer.runtime.visualization.internal.actions.ConfigureColumnsAction in project tdi-studio-se by Talend.
the class ThreadFilteredTree method createContextMenu.
/**
* Creates the context menu.
*
* @param actionBars The action bars
*/
private void createContextMenu(IActionBars actionBars) {
configureColumnsAction = new ConfigureColumnsAction(this);
final CopyAction copyAction = CopyAction.createCopyAction(actionBars);
getViewer().addSelectionChangedListener(copyAction);
//$NON-NLS-1$
MenuManager menuMgr = new MenuManager("#PopupMenu");
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
@Override
public void menuAboutToShow(IMenuManager manager) {
manager.add(copyAction);
manager.add(new Separator());
manager.add(configureColumnsAction);
}
});
Menu menu = menuMgr.createContextMenu(getViewer().getControl());
getViewer().getControl().setMenu(menu);
}
use of org.talend.designer.runtime.visualization.internal.actions.ConfigureColumnsAction in project tdi-studio-se by Talend.
the class NotificationFilteredTree method createContextMenu.
/**
* Creates the context menu.
*
* @param actionBars The action bars
*/
private void createContextMenu(IActionBars actionBars) {
final CopyAction copyAction = CopyAction.createCopyAction(actionBars);
clearAction = new Action(Messages.clearLabel) {
@Override
public void run() {
notificationsTab.clear();
}
};
detailsAction = new NotificationDetailsDialogAction(this);
configureColumnsAction = new ConfigureColumnsAction(this);
getViewer().addSelectionChangedListener(copyAction);
getViewer().addSelectionChangedListener(detailsAction);
//$NON-NLS-1$
MenuManager menuMgr = new MenuManager("#PopupMenu");
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
@Override
public void menuAboutToShow(IMenuManager manager) {
manager.add(copyAction);
manager.add(new Separator());
manager.add(clearAction);
manager.add(new Separator());
manager.add(configureColumnsAction);
manager.add(new Separator());
manager.add(detailsAction);
}
});
Menu menu = menuMgr.createContextMenu(getViewer().getControl());
getViewer().getControl().setMenu(menu);
}
use of org.talend.designer.runtime.visualization.internal.actions.ConfigureColumnsAction in project tdi-studio-se by Talend.
the class HeapHistogramPage method createContextMenu.
/**
* Creates the context menu.
*
* @param actionBars The action bars
*/
private void createContextMenu(IActionBars actionBars) {
final OpenDeclarationAction openAction = OpenDeclarationAction.createOpenDeclarationAction(actionBars);
final CopyAction copyAction = CopyAction.createCopyAction(actionBars);
configureColumnsAction = new ConfigureColumnsAction(this);
heapViewer.addSelectionChangedListener(openAction);
heapViewer.getControl().addFocusListener(new FocusListener() {
@Override
public void focusLost(FocusEvent e) {
heapViewer.removeSelectionChangedListener(copyAction);
}
@Override
public void focusGained(FocusEvent e) {
heapViewer.addSelectionChangedListener(copyAction);
}
});
heapViewer.addOpenListener(new IOpenListener() {
@Override
public void open(OpenEvent event) {
openAction.run();
}
});
//$NON-NLS-1$
MenuManager menuMgr = new MenuManager("#PopupMenu");
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
@Override
public void menuAboutToShow(IMenuManager manager) {
manager.add(openAction);
manager.add(copyAction);
manager.add(new Separator());
manager.add(configureColumnsAction);
}
});
Menu menu = menuMgr.createContextMenu(heapViewer.getControl());
heapViewer.getControl().setMenu(menu);
}
Aggregations