Bug 341273 ESS will not work without parts
While windows without any parts probably isn't a very interesting shape, it is still possible to create such a thing. In this scenario, the ESS may not work properly because we rely solely on the active part for selection information. It should be possible to have a selection at the window level as-is.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/ESelectionServiceTest.java
applicationContext, null);
		assertEquals(selection, handler.selection);
		handler.selection = null;
		ContextInjectionFactory.invoke(handler, Execute.class, windowContext,
				null);
		assertEquals(selection, handler.selection);
		handler.selection = null;
		ContextInjectionFactory.invoke(handler, Execute.class, partContextA,
				null);
		assertEquals(selection, handler.selection);
		handler.selection = null;
		ContextInjectionFactory.invoke(handler, Execute.class, partContextB,
				null);
		assertNull(handler.selection);
		EPartService partService = (EPartService) windowContext
				.get(EPartService.class.getName());
		partService.activate(partB);
		ContextInjectionFactory.invoke(handler, Execute.class,
				applicationContext, null);
		assertNull(handler.selection);
		handler.selection = null;
		ContextInjectionFactory.invoke(handler, Execute.class, windowContext,
				null);
		assertNull(handler.selection);
		handler.selection = null;
		ContextInjectionFactory.invoke(handler, Execute.class, partContextA,
				null);
		assertEquals(selection, handler.selection);
		handler.selection = null;
		ContextInjectionFactory.invoke(handler, Execute.class, partContextB,