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/ModelReconcilerScenarioTest.java
* </ol>
	 */
	public void testPartStack_Addition_ContainsExistingPart2() {
		MApplication application = createApplication();
		MWindow window = createWindow(application);
		MPartStack stack1 = BasicFactoryImpl.eINSTANCE.createPartStack();
		window.getChildren().add(stack1);
		MPart part1 = BasicFactoryImpl.eINSTANCE.createPart();
		MPart part2 = BasicFactoryImpl.eINSTANCE.createPart();
		stack1.getChildren().add(part1);
		stack1.getChildren().add(part2);
		saveModel();
		ModelReconciler reconciler = createModelReconciler();
		reconciler.recordChanges(application);
		MPartStack stack2 = BasicFactoryImpl.eINSTANCE.createPartStack();
		window.getChildren().add(stack2);
		stack2.getChildren().add(part1);
		Object state = reconciler.serialize();
		application = createApplication();
		window = application.getChildren().get(0);
		stack1 = (MPartStack) window.getChildren().get(0);
		part1 = (MPart) stack1.getChildren().get(0);
		part2 = (MPart) stack1.getChildren().get(1);
		Collection<ModelDelta> deltas = constructDeltas(application, state);
		assertEquals(2, stack1.getChildren().size());
		assertEquals(part1, stack1.getChildren().get(0));
		assertEquals(part2, stack1.getChildren().get(1));
		applyAll(deltas);
		assertEquals(1, stack1.getChildren().size());
		assertEquals(part2, stack1.getChildren().get(0));