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.
examples/org.eclipse.e4.examples.services/src/org/eclipse/e4/examples/services/snippets/SnippetSetup.java
public class SnippetSetup  {
	private static IEclipseContext context;
	
	public static void initializeServices() {
		
		
		IEclipseContext osgiContext = EclipseContextFactory.getServiceContext(SnippetActivator.bundleContext);
		Assert.isNotNull(osgiContext);
		
		context = EclipseContextFactory.create(osgiContext, null);
		Assert.isNotNull(context);
		
		
		context.set(Adapter.class.getName(), ContextInjectionFactory.inject(
				new EclipseAdapter(), context));
	}
	
	public static void setup(Object toBeSetup) {
		ContextInjectionFactory.inject(toBeSetup, context);
	}
	
	public static void dispose() {
		context = null;
	}
}