Search in sources :

Example 1 with AgreeMenuListener

use of com.rockwellcollins.atc.agree.analysis.views.AgreeMenuListener in project AMASE by loonwerks.

the class SafetyResultsView method createPartControl.

@Override
public void createPartControl(Composite parent) {
    safetyResultTree = new SafetyAnalysisResultTree(parent);
    safetyResultTree.getViewer().setAutoExpandLevel(2);
    safetyMenuListener = new AgreeMenuListener(getViewSite().getWorkbenchWindow(), safetyResultTree);
    MenuManager manager = new MenuManager();
    manager.setRemoveAllWhenShown(true);
    manager.addMenuListener(safetyMenuListener);
    safetyResultTree.getControl().setMenu(manager.createContextMenu(safetyResultTree.getViewer().getTree()));
}
Also used : AgreeMenuListener(com.rockwellcollins.atc.agree.analysis.views.AgreeMenuListener) MenuManager(org.eclipse.jface.action.MenuManager)

Aggregations

AgreeMenuListener (com.rockwellcollins.atc.agree.analysis.views.AgreeMenuListener)1 MenuManager (org.eclipse.jface.action.MenuManager)1