Bug 317121 [Compatibility] Second open of File menu shifts contributions around
The first time we open the File menu, the Restart item is by Switch Workspace. The second time it opens, Restart appears at the top. The cleanup was calling removeGui(*) on the child elements. Then the Restart item was added and rendered by the listener at idx==0. Then the later call to createGui(*) on all children skip Restart because it already has a widget. PW
bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/workbench/swt/modeling/MenuServiceFilter.java
private static final String TMP_ORIGINAL_CONTEXT = "MenuServiceFilter.original.context";
	final public static String MC_POPUP = "menuContribution:popup";
	final public static String MC_MENU = "menuContribution:menu";
	private static void trace(String msg, Widget menu, MMenu menuModel) {
		WorkbenchSWTActivator.trace(Policy.MENUS, msg + ": " + menu + ": "
				+ menuModel, null);
	}
	private static Method aboutToShow;
	public static Method getAboutToShow() {
		if (aboutToShow == null) {
			try {
				aboutToShow = MenuManager.class
						.getDeclaredMethod("handleAboutToShow");
				aboutToShow.setAccessible(true);
			} catch (SecurityException e) {
				
				e.printStackTrace();
			} catch (NoSuchMethodException e) {
				
				e.printStackTrace();
			}
		}
		return aboutToShow;
	}
	@Inject