Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2014-03-31 03:21:48 +0000
committerslewis2014-03-31 03:21:48 +0000
commitc690aba14eb31e4fe085b0c6b80db497ad7bdbb8 (patch)
treeff5c47e400abb10ce35592174e7ef6cf054e8ecb /providers
parent98a4ada4184ab2774178c614026073c0619ae308 (diff)
downloadorg.eclipse.ecf-c690aba14eb31e4fe085b0c6b80db497ad7bdbb8.tar.gz
org.eclipse.ecf-c690aba14eb31e4fe085b0c6b80db497ad7bdbb8.tar.xz
org.eclipse.ecf-c690aba14eb31e4fe085b0c6b80db497ad7bdbb8.zip
Additions to convert datashare provider to allow no registry bug 421569
Diffstat (limited to 'providers')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.datashare/META-INF/MANIFEST.MF2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.datashare/plugin.xml18
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/internal/provider/datashare/Activator.java31
3 files changed, 45 insertions, 6 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.datashare/META-INF/MANIFEST.MF b/providers/bundles/org.eclipse.ecf.provider.datashare/META-INF/MANIFEST.MF
index 04cb9629d..c0c72691e 100644
--- a/providers/bundles/org.eclipse.ecf.provider.datashare/META-INF/MANIFEST.MF
+++ b/providers/bundles/org.eclipse.ecf.provider.datashare/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.ecf.provider.datashare;singleton:=true
-Bundle-Version: 1.4.100.qualifier
+Bundle-Version: 1.5.0.qualifier
Bundle-Activator: org.eclipse.ecf.internal.provider.datashare.Activator
Bundle-Vendor: %plugin.provider
Bundle-Localization: plugin
diff --git a/providers/bundles/org.eclipse.ecf.provider.datashare/plugin.xml b/providers/bundles/org.eclipse.ecf.provider.datashare/plugin.xml
index bf74e668b..38cd24e8c 100644
--- a/providers/bundles/org.eclipse.ecf.provider.datashare/plugin.xml
+++ b/providers/bundles/org.eclipse.ecf.provider.datashare/plugin.xml
@@ -18,5 +18,23 @@
<adapter type="org.eclipse.ecf.datashare.IChannelContainerAdapter"/>
</factory>
</extension>
+
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.ecf.provider.generic.SSLClientSOContainer"
+ class="org.eclipse.ecf.provider.datashare.DatashareContainerAdapterFactory">
+ <adapter type="org.eclipse.ecf.datashare.IChannelContainerAdapter"/>
+ </factory>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.ecf.provider.generic.SSLServerSOContainer"
+ class="org.eclipse.ecf.provider.datashare.DatashareContainerAdapterFactory">
+ <adapter type="org.eclipse.ecf.datashare.IChannelContainerAdapter"/>
+ </factory>
+ </extension>
</plugin>
diff --git a/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/internal/provider/datashare/Activator.java b/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/internal/provider/datashare/Activator.java
index e2bacf0c4..035178190 100644
--- a/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/internal/provider/datashare/Activator.java
+++ b/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/internal/provider/datashare/Activator.java
@@ -11,11 +11,11 @@
package org.eclipse.ecf.internal.provider.datashare;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.IStatus;
+import java.util.List;
+import org.eclipse.core.runtime.*;
import org.eclipse.ecf.core.IContainerManager;
-import org.eclipse.ecf.core.util.AdapterManagerTracker;
-import org.eclipse.ecf.core.util.LogHelper;
+import org.eclipse.ecf.core.util.*;
+import org.eclipse.ecf.provider.datashare.DatashareContainerAdapterFactory;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.service.log.LogService;
@@ -61,11 +61,32 @@ public class Activator implements BundleActivator {
}
}
+ List rscAdapterFactories;
+
/**
* This method is called upon plug-in activation
*/
- public void start(BundleContext ctxt) throws Exception {
+ public void start(final BundleContext ctxt) throws Exception {
this.context = ctxt;
+ SafeRunner.run(new ExtensionRegistryRunnable(ctxt) {
+ protected void runWithoutRegistry() throws Exception {
+ IAdapterManager am = getAdapterManager();
+ if (am != null) {
+ IAdapterFactory af = new DatashareContainerAdapterFactory();
+ am.registerAdapters(af, org.eclipse.ecf.provider.generic.SSLServerSOContainer.class);
+ rscAdapterFactories.add(af);
+ af = new DatashareContainerAdapterFactory();
+ am.registerAdapters(af, org.eclipse.ecf.provider.generic.TCPServerSOContainer.class);
+ rscAdapterFactories.add(af);
+ af = new DatashareContainerAdapterFactory();
+ am.registerAdapters(af, org.eclipse.ecf.provider.generic.SSLClientSOContainer.class);
+ rscAdapterFactories.add(af);
+ af = new DatashareContainerAdapterFactory();
+ am.registerAdapters(af, org.eclipse.ecf.provider.generic.TCPClientSOContainer.class);
+ rscAdapterFactories.add(af);
+ }
+ }
+ });
}
/**

Back to the top