Bug 331668 ESelectionService should not notify listeners if the active part does not post selections
Even if you do not set a selection provider for your IWorkbenchPart implementation, we are still propagating selection events for that part within the given workbench window.
tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/application/ESelectionServiceTest.java
ESelectionService selectionServiceB = partContextB
				.get(ESelectionService.class);
		InjectPart injectPart = ContextInjectionFactory.make(InjectPart.class,
				partContextA);
		assertNull(injectPart.selection);
		Object o = new Target("");
		selectionServiceA.setSelection(o);
		assertEquals(o, injectPart.selection);
		partService.activate(partB);
		assertEquals("Part B doesn't post a selection, no change", o,
				injectPart.selection);
		partService.activate(partA);
		assertEquals(o, injectPart.selection);
		Object o2 = new Target("");
		selectionServiceB.setSelection(o2);
		assertEquals(o, injectPart.selection);
		partService.activate(partB);
		assertEquals(o2, injectPart.selection);
		partService.activate(partA);
		assertEquals(o, injectPart.selection);
	}
	private void initialize(IEclipseContext applicationContext,
			MApplication application) {
		applicationContext.set(MApplication.class.getName(), application);
		application.setContext(applicationContext);
		E4Workbench.processHierarchy(application);
		((Notifier) application).eAdapters().add(
				new UIEventPublisher(applicationContext));
	}
	static class SelectionListener implements ISelectionListener {