// TODO: Run/Debug?
// insert ElementEdit contributed menu items
final ContainerActionGroup containerActionGroup =
new ContainerActionGroup();
ActionContext context = new ActionContext(_viewer
.getSelection());
context.setInput(_viewer);
containerActionGroup.setContext(context);
containerActionGroup.fillContextMenu(menuMgr1);
containerActionGroup.setContext(null);
// TODO: TableActionGroup
// if on a text context, (instead of a ElementEditPart),
// add text styling actions
final RangeActionGroup rangeActionGroup = new RangeActionGroup();
context = new ActionContext(_viewer.getSelection());
context.setInput(_viewer);
rangeActionGroup.setContext(context);
rangeActionGroup.fillContextMenu(menuMgr1);
rangeActionGroup.setContext(null);
// Add actions for single ElementEditPart's that are common
// to all
final SingleElementActionGroup singleActionGroup =
new SingleElementActionGroup();
singleActionGroup.setContext(new ActionContext(_viewer
.getSelection()));
singleActionGroup.fillContextMenu(menuMgr1);
singleActionGroup.setContext(null);
// add "Show In" actions...
final RelatedViewActionGroup viewMenu = new RelatedViewActionGroup(getEditDomain());
context = new ActionContext(_viewer.getSelection());
viewMenu.setContext(context);
viewMenu.fillContextMenu(menuMgr1);
// add extension point contributed menu actions
CustomedContextMenuActionGroup customedMenu = new CustomedContextMenuActionGroup();
customedMenu.setContext(new ActionContext(_viewer
.getSelection()));
customedMenu.setModel(_model);
customedMenu.setParentControl(_viewer.getControl());
customedMenu.fillContextMenu(menuMgr1);
customedMenu.setContext(null);