Search in sources :

Example 1 with TrivialContainerInstantiator

use of org.eclipse.ecf.internal.examples.provider.trivial.container.TrivialContainerInstantiator in project ecf by eclipse.

the class Activator method start.

/*
	 * (non-Javadoc)
	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
	 */
public void start(BundleContext context) throws Exception {
    this.context = context;
    plugin = this;
    SafeRunner.run(new ExtensionRegistryRunnable(this.context) {

        protected void runWithoutRegistry() throws Exception {
            // If we don't have a registry, then register trivial namespace
            Activator.this.context.registerService(Namespace.class, new TrivialNamespace(TrivialNamespace.NAME), null);
            // And create and register ContainerTypeDescription
            Activator.this.context.registerService(ContainerTypeDescription.class, new ContainerTypeDescription(TrivialContainerInstantiator.NAME, (IContainerInstantiator) new TrivialContainerInstantiator()), null);
        }
    });
}
Also used : TrivialNamespace(org.eclipse.ecf.examples.provider.trivial.identity.TrivialNamespace) ContainerTypeDescription(org.eclipse.ecf.core.ContainerTypeDescription) ExtensionRegistryRunnable(org.eclipse.ecf.core.util.ExtensionRegistryRunnable) TrivialContainerInstantiator(org.eclipse.ecf.internal.examples.provider.trivial.container.TrivialContainerInstantiator) TrivialNamespace(org.eclipse.ecf.examples.provider.trivial.identity.TrivialNamespace) Namespace(org.eclipse.ecf.core.identity.Namespace)

Aggregations

ContainerTypeDescription (org.eclipse.ecf.core.ContainerTypeDescription)1 Namespace (org.eclipse.ecf.core.identity.Namespace)1 ExtensionRegistryRunnable (org.eclipse.ecf.core.util.ExtensionRegistryRunnable)1 TrivialNamespace (org.eclipse.ecf.examples.provider.trivial.identity.TrivialNamespace)1 TrivialContainerInstantiator (org.eclipse.ecf.internal.examples.provider.trivial.container.TrivialContainerInstantiator)1