Source:
<code>CommitGraphTable(final Composite parent, final IPageSite site, final MenuManager menuMgr, final TableLoader loader, final ResourceManager resources) { this(parent, loader, resources, true, true); final IAction selectAll = ActionUtils.createGlobalAction( ActionFactory.SELECT_ALL, () -> getTableView().getTable().selectAll()); ActionUtils.setGlobalActions(getTable(), copy, selectAll); getTableView().addOpenListener(new IOpenListener() { @Override public void open(OpenEvent event) { if (input == null || !input.isSingleFile()) return; ICommandService srv = CommonUtils.getService(site, ICommandService.class); IHandlerService hsrv = CommonUtils.getService(site, IHandlerService.class); Command cmd = srv.getCommand(ShowVersionsHandler.COMMAND_ID); Parameterization[] parms; if (Activator.getDefault().getPreferenceStore().getBoolean( UIPreferences.RESOURCEHISTORY_COMPARE_MODE)) try { IParameter parm = cmd .getParameter( ShowVersionsHandler.COMPARE_MODE_PARAM); parms = new Parameterization[] { new Parameterization( parm, Boolean.TRUE.toString()) }; } catch (NotDefinedException e) { Activator.handleError(e.getMessage(), e, true); parms = null; } else parms = null; ParameterizedCommand pcmd = new ParameterizedCommand(cmd, parms); try { hsrv.executeCommandInContext(pcmd, null, hsrv .getCurrentState()); } catch (Exception e) { Activator.handleError(e.getMessage(), e, true); } } }); Control c = getTable(); menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(manager -> { c.setFocus(); menuMgr.add(new Separator(IWorkbenchActionConstants.HISTORY_GROUP)); menuMgr.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); if (copy.isEnabled()) { menuMgr.add(new Separator()); menuMgr.add(copy); } <START> }); <END> }</code><technical_language>lost c.setMenu(menuMgr.createContextMenu(c)); here. (After lambda.)</technical_language>

Target:
CommitGraphTable(final Composite parent, final IPageSite site, final MenuManager menuMgr, final TableLoader loader, final ResourceManager resources) { this(parent, loader, resources, true, true); final IAction selectAll = ActionUtils.createGlobalAction( ActionFactory.SELECT_ALL, () -> getTableView().getTable().selectAll()); ActionUtils.setGlobalActions(getTable(), copy, selectAll); getTableView().addOpenListener(new IOpenListener() { @Override public void open(OpenEvent event) { if (input == null || !input.isSingleFile()) return; ICommandService srv = CommonUtils.getService(site, ICommandService.class); IHandlerService hsrv = CommonUtils.getService(site, IHandlerService.class); Command cmd = srv.getCommand(ShowVersionsHandler.COMMAND_ID); Parameterization[] parms; if (Activator.getDefault().getPreferenceStore().getBoolean( UIPreferences.RESOURCEHISTORY_COMPARE_MODE)) try { IParameter parm = cmd .getParameter( ShowVersionsHandler.COMPARE_MODE_PARAM); parms = new Parameterization[] { new Parameterization( parm, Boolean.TRUE.toString()) }; } catch (NotDefinedException e) { Activator.handleError(e.getMessage(), e, true); parms = null; } else parms = null; ParameterizedCommand pcmd = new ParameterizedCommand(cmd, parms); try { hsrv.executeCommandInContext(pcmd, null, hsrv .getCurrentState()); } catch (Exception e) { Activator.handleError(e.getMessage(), e, true); } } }); Control c = getTable(); menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(manager -> { c.setFocus(); menuMgr.add(new Separator(IWorkbenchActionConstants.HISTORY_GROUP)); menuMgr.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); if (copy.isEnabled()) { menuMgr.add(new Separator()); menuMgr.add(copy); } }); c.setMenu(menuMgr.createContextMenu(c)); }