Bug 307901 EPartService does not short circuit saveAll(boolean) if 'false' and/or no save handler is provided
The code looks like so... boolean success = true; for (MPart dirtyPart : dirtyParts) { if (!savePart(dirtyPart, false)) { success = false; } } return success; ...the first time a save fails, we should return false immediately.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java
MApplication application = MApplicationFactory.eINSTANCE
				.createApplication();
		MWindow window = MApplicationFactory.eINSTANCE.createWindow();
		application.getChildren().add(window);
		MPartStack partStackA = MApplicationFactory.eINSTANCE.createPartStack();
		MPartStack partStackB = MApplicationFactory.eINSTANCE.createPartStack();
		window.getChildren().add(partStackA);
		window.getChildren().add(partStackB);
		MPart partA1 = MApplicationFactory.eINSTANCE.createPart();
		MPart partA2 = MApplicationFactory.eINSTANCE.createPart();
		partA1.setId("partA1");
		partA2.setId("partA2");
		partStackA.getChildren().add(partA1);
		partStackA.getChildren().add(partA2);
		MPart partB1 = MApplicationFactory.eINSTANCE.createPart();
		MPart partB2 = MApplicationFactory.eINSTANCE.createPart();
		partB1.setId("partB1");
		partB2.setId("partB2");
		partStackB.getChildren().add(partB1);
		partStackB.getChildren().add(partB2);
		partStackA.setSelectedElement(partA1);
		partStackB.setSelectedElement(partB1);
		window.setSelectedElement(partStackA);
		application.setSelectedElement(window);
		initialize(applicationContext, application);
		getEngine().createGui(window);
		EPartService partService = (EPartService) window.getContext().get(
				EPartService.class.getName());
		partService.activate(partA1);
		assertEquals(partA1, partService.getActivePart());