Bug 330114 [Compatibility] Link the WW menu manager
Instead of copying the WorkbenchWindow menu manager code to the model, and then regenerating most of it, we can now link the window MMenu to the MenuManager filled in by the WorkbenchActionBuilder. A compatibility level reconciler can create e4 equivalents for the contribution items we can translate (CommandContributionItems, ActionContributionItems that have a definition id, etc). PW
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java
newMenu.setData(menuManager);
		}
		if (!menuManager.getRemoveAllWhenShown()) {
			processContributions(menuModel, menuBar);
		}
		if (newMenu != null) {
			newMenu.addDisposeListener(new DisposeListener() {
				public void widgetDisposed(DisposeEvent e) {
					cleanUp(menuModel);
				}
			});
		}
		return newMenu;
	}
	/**
	 * @param menuModel
	 */
	public void cleanUp(MMenu menuModel) {
		Collection<ContributionRecord> vals = modelContributionToRecord
				.values();
		for (ContributionRecord record : vals
				.toArray(new ContributionRecord[vals.size()])) {
			if (record.menuModel == menuModel) {
				record.dispose();
				for (MMenuElement copy : record.generatedElements) {
					modelContributionToRecord.remove(copy);
					if (copy instanceof MMenu) {
						MMenu menuCopy = (MMenu) copy;