checkWidget();
this.contextMenu = contextMenu;
if (tableViewer != null && tableViewer.getControl() != null) {
Menu oldMenu = tableViewer.getControl().getMenu();
if (oldMenu != null)
oldMenu.dispose();
Menu menu = contextMenu.createContextMenu(tableViewer.getControl());
tableViewer.getControl().setMenu(menu);
}
}