Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2014-03-31 04:08:54 +0000
committerslewis2014-03-31 04:08:54 +0000
commitb4d560fd891d1fe327910f53f7fcb9534885d9b3 (patch)
treee3cd6769b47a02dcd3377c0726e812e5bb3210e3 /providers
parentdc21fceea68dac3130698ca8fdb74431953d030a (diff)
downloadorg.eclipse.ecf-b4d560fd891d1fe327910f53f7fcb9534885d9b3.tar.gz
org.eclipse.ecf-b4d560fd891d1fe327910f53f7fcb9534885d9b3.tar.xz
org.eclipse.ecf-b4d560fd891d1fe327910f53f7fcb9534885d9b3.zip
Additions to allow org.eclipse.ecf.provider.local to be used without
extension registry bug 421569 Change-Id: I0000000000000000000000000000000000000000
Diffstat (limited to 'providers')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.local/META-INF/MANIFEST.MF2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.local/src/org/eclipse/ecf/internal/provider/local/Activator.java15
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.local/src/org/eclipse/ecf/provider/local/identity/LocalNamespace.java4
3 files changed, 19 insertions, 2 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.local/META-INF/MANIFEST.MF b/providers/bundles/org.eclipse.ecf.provider.local/META-INF/MANIFEST.MF
index 060762c01..7aaddeb01 100644
--- a/providers/bundles/org.eclipse.ecf.provider.local/META-INF/MANIFEST.MF
+++ b/providers/bundles/org.eclipse.ecf.provider.local/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: ECF Local Remote Service Provider
Bundle-SymbolicName: org.eclipse.ecf.provider.local;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
Bundle-Activator: org.eclipse.ecf.internal.provider.local.Activator
Bundle-Vendor: Eclipse.org - ECF
Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
diff --git a/providers/bundles/org.eclipse.ecf.provider.local/src/org/eclipse/ecf/internal/provider/local/Activator.java b/providers/bundles/org.eclipse.ecf.provider.local/src/org/eclipse/ecf/internal/provider/local/Activator.java
index 5add95bcd..40c0f7b8b 100644
--- a/providers/bundles/org.eclipse.ecf.provider.local/src/org/eclipse/ecf/internal/provider/local/Activator.java
+++ b/providers/bundles/org.eclipse.ecf.provider.local/src/org/eclipse/ecf/internal/provider/local/Activator.java
@@ -1,5 +1,11 @@
package org.eclipse.ecf.internal.provider.local;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.ecf.core.ContainerTypeDescription;
+import org.eclipse.ecf.core.identity.Namespace;
+import org.eclipse.ecf.core.util.ExtensionRegistryRunnable;
+import org.eclipse.ecf.internal.provider.local.container.LocalRemoteServiceContainerInstantiator;
+import org.eclipse.ecf.provider.local.identity.LocalNamespace;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
@@ -15,8 +21,15 @@ public class Activator implements BundleActivator {
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
- public void start(BundleContext bundleContext) throws Exception {
+ public void start(final BundleContext bundleContext) throws Exception {
Activator.context = bundleContext;
+
+ SafeRunner.run(new ExtensionRegistryRunnable(bundleContext) {
+ protected void runWithoutRegistry() throws Exception {
+ bundleContext.registerService(Namespace.class, new LocalNamespace(), null);
+ bundleContext.registerService(ContainerTypeDescription.class, new ContainerTypeDescription("ecf.local", new LocalRemoteServiceContainerInstantiator(), "Local Container Instantiator", false, false), null); //$NON-NLS-1$//$NON-NLS-2$
+ }
+ });
}
/*
diff --git a/providers/bundles/org.eclipse.ecf.provider.local/src/org/eclipse/ecf/provider/local/identity/LocalNamespace.java b/providers/bundles/org.eclipse.ecf.provider.local/src/org/eclipse/ecf/provider/local/identity/LocalNamespace.java
index cc4cdfa48..58355279c 100644
--- a/providers/bundles/org.eclipse.ecf.provider.local/src/org/eclipse/ecf/provider/local/identity/LocalNamespace.java
+++ b/providers/bundles/org.eclipse.ecf.provider.local/src/org/eclipse/ecf/provider/local/identity/LocalNamespace.java
@@ -19,6 +19,10 @@ public class LocalNamespace extends Namespace {
public static final String NAME = "ecf.namespace.local"; //$NON-NLS-1$
public static final String SCHEME = "local"; //$NON-NLS-1$
+ public LocalNamespace() {
+ super(NAME, "Local Namespace"); //$NON-NLS-1$
+ }
+
public ID createInstance(Object[] parameters) throws IDCreateException {
try {
final String init = getInitStringFromExternalForm(parameters);

Back to the top