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
window.getChildren().add(partStack);
			for (int j = 0; j < partIds[i].length; j++) {
				MPart part = BasicFactoryImpl.eINSTANCE.createPart();
				part.setElementId(partIds[i][j]);
				partStack.getChildren().add(part);
			}
		}
		initialize(applicationContext, application);
		return application;
	}
	private void initialize(IEclipseContext applicationContext,
			MApplication application) {
		application.setContext(applicationContext);
		applicationContext.set(MApplication.class.getName(), application);
		E4Workbench.processHierarchy(application);
		((Notifier) application).eAdapters().add(
				new UIEventPublisher(applicationContext));
		applicationContext.set(ISaveHandler.class.getName(),
				new ISaveHandler() {
					public Save[] promptToSave(Collection<MPart> saveablePart) {
						Save[] ret = new Save[saveablePart.size()];
						Arrays.fill(ret, ISaveHandler.Save.YES);
						return ret;
					}
					public Save promptToSave(MPart saveablePart) {
						return ISaveHandler.Save.YES;
					}
				});
	}
	class PartListener implements IPartListener {