Bug 342998 Refactor ESelectionService into multiple classes
While there is a master/slave relationship "enforced" by the current implementation, it is non-obvious as the code is quite convoluted. The implementation needs to be refactored to enhance readability.
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/SelectionServiceImpl.java
.subscribe(UIEvents.buildTopic(UIEvents.Context.TOPIC, UIEvents.Context.CONTEXT),
						eventHandler);
		
		if (isMasterService()) {
			for (MPart part : partService.getParts()) {
				track(part);
			}
		}
	}
	/**
	 * Returns whether this selection service is one that should be tracking the selection of other
	 * parts or not.
	 * 
	 * @return <code>true</code> if this service monitors the selection changes of multiple parts
	 */
	private boolean isMasterService() {
		IEclipseContext rootContext = serviceRoot.getContext();
		if (rootContext == context) {
			return true;
		}
		IEclipseContext parent = rootContext.getParent();
		while (parent != null) {
			if (parent == context) {
				return true;
			}
			parent = parent.getParent();
		}
		return false;
	}
	@Inject