Bug 316558 [XMI] Changes to a window's main menu is not being persisted properly
Additions to an MWindow's main menu is not being persisted correctly.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/reconciler/ModelReconcilerWindowTest.java
assertEquals("File", menu.getChildren().get(0).getLabel());
	}
	public void testWindow_Menu_Children_Remove() {
		MApplication application = createApplication();
		MWindow window = createWindow(application);
		MMenu menu = MenuFactoryImpl.eINSTANCE.createMenu();
		window.setMainMenu(menu);
		MMenuItem menuItem = MenuFactoryImpl.eINSTANCE.createDirectMenuItem();
		menuItem.setLabel("File");
		menu.getChildren().add(menuItem);
		saveModel();
		ModelReconciler reconciler = createModelReconciler();
		reconciler.recordChanges(application);
		menu.getChildren().remove(0);
		Object state = reconciler.serialize();
		application = createApplication();
		window = application.getChildren().get(0);
		menu = window.getMainMenu();
		Collection<ModelDelta> deltas = constructDeltas(application, state);
		assertEquals(1, application.getChildren().size());
		assertEquals(window, application.getChildren().get(0));
		assertEquals(menu, window.getMainMenu());
		assertEquals(1, menu.getChildren().size());
		assertNotNull(menu.getChildren().get(0));
		assertEquals("File", menu.getChildren().get(0).getLabel());
		applyAll(deltas);
		assertEquals(1, application.getChildren().size());
		assertEquals(window, application.getChildren().get(0));
		assertEquals(menu, window.getMainMenu());
		assertEquals(0, menu.getChildren().size());