Bug 304239 move each core application service to its own package
In M4, some services have their own package, others are provided in core.services. Boris and I talked about moving each service (API) to its own package. Reasons are: - aids with discoverability - helps separate application services from other public API in the core.services package (such as IDisposable, JSONObject) - helps to emphasize that services can be setup and consumed individually - will make it easier to move to separate bundles if that is ever needed This means moving Adapter, Logger, IStatusHandler to their own packages.
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/ReflectionContributionFactory.java
import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.e4.core.services.IContributionFactory;
import org.eclipse.e4.core.services.IContributionFactorySpi;
import org.eclipse.emf.common.util.URI;
import org.osgi.framework.Bundle;
import org.osgi.service.log.LogService;
/**
 * Create the contribution factory.
 */
public class ReflectionContributionFactory implements IContributionFactory {
	private IExtensionRegistry registry;
	private Map<String, Object> languages;
	/**
	 * Create a reflection factory.
	 * 
	 * @param registry
	 *            to read languages.
	 */
	public ReflectionContributionFactory(IExtensionRegistry registry) {
		this.registry = registry;
		processLanguages();
	}
	public Object call(Object object, String uriString, String methodName, IEclipseContext context,
			Object defaultValue) {
		if (uriString != null) {
			URI uri = URI.createURI(uriString);
			if (uri.segmentCount() > 3) {
				String prefix = uri.segment(2);
				IContributionFactorySpi factory = (IContributionFactorySpi) languages.get(prefix);
				return factory.call(object, methodName, context, defaultValue);