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
assertEquals(selection2, partThreeImpl.input);
		ESelectionService selectionService = (ESelectionService) partContextA
				.get(ESelectionService.class.getName());
		selectionService.addSelectionListener(partC.getElementId(),
				new ISelectionListener() {
					public void selectionChanged(MPart part, Object selection) {
						partOneImpl.setOtherSelection(selection);
					}
				});
		partThreeImpl.setSelection(selection3);
		assertEquals(selection, partOneImpl.input);
		assertEquals(selection3, partOneImpl.otherSelection);
		assertNull(partTwoImpl.input);
		assertEquals(selection3, partThreeImpl.input);
		partThreeImpl.setSelection(selection);
		assertEquals(selection, partOneImpl.input);
		assertEquals(selection, partOneImpl.otherSelection);
		assertNull(partTwoImpl.input);
		assertEquals(selection, partThreeImpl.input);
		partThreeImpl.setSelection(null);
		assertEquals(selection, partOneImpl.input);
		assertNull(partOneImpl.otherSelection);
		assertNull(partTwoImpl.input);
		assertNull(partThreeImpl.input);
	}
	static class Target {
		Target(String s) {
		}
	}
	static class InjectPart {