Bug 326177 EPartService's getActivePart() does not appear to work properly for an application with multiple windows
Based on the code in PartServiceCreationFunction, the EPartService implementation being returned when an application's context is queried seems to be a window-level EPartService implementation.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/EPartServiceTest.java
private void testShowPart_Id_Unrendered2(EPartService.PartState partState) {
		MApplication application = ApplicationFactoryImpl.eINSTANCE
				.createApplication();
		MWindow window = BasicFactoryImpl.eINSTANCE.createWindow();
		window.setToBeRendered(true);
		application.getChildren().add(window);
		application.setSelectedElement(window);
		MPartStack partStack = BasicFactoryImpl.eINSTANCE.createPartStack();
		partStack.setToBeRendered(false);
		window.getChildren().add(partStack);
		window.setSelectedElement(partStack);
		MPart part = BasicFactoryImpl.eINSTANCE.createPart();
		part.setElementId("partId");
		part.setToBeRendered(false);
		partStack.getChildren().add(part);
		partStack.setSelectedElement(part);
		initialize(applicationContext, application);
		getEngine().createGui(window);
		EPartService partService = (EPartService) window.getContext().get(
				EPartService.class.getName());
		MPart shownPart = partService.showPart("partId", partState);
		assertEquals(1, partStack.getChildren().size());
		assertEquals(part, partStack.getChildren().get(0));
		assertEquals(part, shownPart);
		assertTrue("A shown part should be rendered", part.isToBeRendered());
	}
	public void testShowPart_Id_Unrendered_CREATE2() {
		testShowPart_Id_Unrendered2(PartState.CREATE);
	}
	public void testShowPart_Id_Unrendered_VISIBLE2() {