Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-10-07 21:03:38 +0000
committerslewis2008-10-07 21:03:38 +0000
commite7a10709b751f2d84f26ab3922b76c1f97cf26b0 (patch)
treef5244362842ee8bb85f865d04dedf2dda39f9655
parenta37b27567d20a2f4eff5808292596d2f53682331 (diff)
downloadorg.eclipse.ecf-e7a10709b751f2d84f26ab3922b76c1f97cf26b0.tar.gz
org.eclipse.ecf-e7a10709b751f2d84f26ab3922b76c1f97cf26b0.tar.xz
org.eclipse.ecf-e7a10709b751f2d84f26ab3922b76c1f97cf26b0.zip
Fix for wrong IServiceConstant value
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.sync/src/org/eclipse/ecf/internal/tests/sync/Activator.java162
1 files changed, 81 insertions, 81 deletions
diff --git a/tests/bundles/org.eclipse.ecf.tests.sync/src/org/eclipse/ecf/internal/tests/sync/Activator.java b/tests/bundles/org.eclipse.ecf.tests.sync/src/org/eclipse/ecf/internal/tests/sync/Activator.java
index 2723001b8..41331b29a 100755
--- a/tests/bundles/org.eclipse.ecf.tests.sync/src/org/eclipse/ecf/internal/tests/sync/Activator.java
+++ b/tests/bundles/org.eclipse.ecf.tests.sync/src/org/eclipse/ecf/internal/tests/sync/Activator.java
@@ -1,81 +1,81 @@
-package org.eclipse.ecf.internal.tests.sync;
-
-import org.eclipse.ecf.sync.IServiceConstants;
-import org.eclipse.ecf.sync.doc.IDocumentSynchronizationStrategyFactory;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class Activator implements BundleActivator {
-
- private BundleContext context;
- private ServiceTracker serviceTracker;
-
- private static Activator plugin;
-
- public static Activator getDefault() {
- return plugin;
- }
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext ctxt) throws Exception {
- plugin = this;
- this.context = ctxt;
- }
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- if (serviceTracker != null) {
- serviceTracker.close();
- serviceTracker = null;
- }
- plugin = null;
- this.context = null;
- }
-
- public IDocumentSynchronizationStrategyFactory [] getSynchStrategyFactories() {
- if (serviceTracker == null) {
- serviceTracker = new ServiceTracker(context,IDocumentSynchronizationStrategyFactory.class.getName(),null);
- serviceTracker.open();
- }
- ServiceReference [] refs = serviceTracker.getServiceReferences();
- if (refs == null) return null;
- IDocumentSynchronizationStrategyFactory [] strats = new IDocumentSynchronizationStrategyFactory [refs.length];
- for(int i =0; i < refs.length; i++) {
- strats[i] = (IDocumentSynchronizationStrategyFactory) serviceTracker.getService(refs[i]);
- }
- return strats;
- }
-
- public IDocumentSynchronizationStrategyFactory getSynchStrategyFactory(String serviceProvider) {
- if (serviceTracker == null) {
- serviceTracker = new ServiceTracker(context,IDocumentSynchronizationStrategyFactory.class.getName(),null);
- serviceTracker.open();
- }
- ServiceReference [] refs = serviceTracker.getServiceReferences();
- if (refs == null) return null;
- IDocumentSynchronizationStrategyFactory result = null;
- for(int i =0; i < refs.length; i++) {
- String prop = (String) refs[i].getProperty(IServiceConstants.SYNCSTRATEGY_TYPE_PROPERTY);
- if (prop != null && prop.equals(serviceProvider)) {
- result = (IDocumentSynchronizationStrategyFactory) serviceTracker.getService(refs[i]);
- }
- }
- return result;
- }
-
- public IDocumentSynchronizationStrategyFactory getColaSynchronizationStrategyFactory() {
- return getSynchStrategyFactory("org.eclipse.ecf.internal.sync.doc.cola");
- }
-
- public IDocumentSynchronizationStrategyFactory getIdentitySynchronizationStrategy() {
- return getSynchStrategyFactory("org.eclipse.ecf.sync.doc.identity");
- }
-}
+package org.eclipse.ecf.internal.tests.sync;
+
+import org.eclipse.ecf.sync.IServiceConstants;
+import org.eclipse.ecf.sync.doc.IDocumentSynchronizationStrategyFactory;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
+
+public class Activator implements BundleActivator {
+
+ private BundleContext context;
+ private ServiceTracker serviceTracker;
+
+ private static Activator plugin;
+
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext ctxt) throws Exception {
+ plugin = this;
+ this.context = ctxt;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ if (serviceTracker != null) {
+ serviceTracker.close();
+ serviceTracker = null;
+ }
+ plugin = null;
+ this.context = null;
+ }
+
+ public IDocumentSynchronizationStrategyFactory [] getSynchStrategyFactories() {
+ if (serviceTracker == null) {
+ serviceTracker = new ServiceTracker(context,IDocumentSynchronizationStrategyFactory.class.getName(),null);
+ serviceTracker.open();
+ }
+ ServiceReference [] refs = serviceTracker.getServiceReferences();
+ if (refs == null) return null;
+ IDocumentSynchronizationStrategyFactory [] strats = new IDocumentSynchronizationStrategyFactory [refs.length];
+ for(int i =0; i < refs.length; i++) {
+ strats[i] = (IDocumentSynchronizationStrategyFactory) serviceTracker.getService(refs[i]);
+ }
+ return strats;
+ }
+
+ public IDocumentSynchronizationStrategyFactory getSynchStrategyFactory(String serviceProvider) {
+ if (serviceTracker == null) {
+ serviceTracker = new ServiceTracker(context,IDocumentSynchronizationStrategyFactory.class.getName(),null);
+ serviceTracker.open();
+ }
+ ServiceReference [] refs = serviceTracker.getServiceReferences();
+ if (refs == null) return null;
+ IDocumentSynchronizationStrategyFactory result = null;
+ for(int i =0; i < refs.length; i++) {
+ String prop = (String) refs[i].getProperty(IServiceConstants.SYNCSTRATEGY_PROVIDER_PROPETY);
+ if (prop != null && prop.equals(serviceProvider)) {
+ result = (IDocumentSynchronizationStrategyFactory) serviceTracker.getService(refs[i]);
+ }
+ }
+ return result;
+ }
+
+ public IDocumentSynchronizationStrategyFactory getColaSynchronizationStrategyFactory() {
+ return getSynchStrategyFactory("org.eclipse.ecf.internal.sync.doc.cola");
+ }
+
+ public IDocumentSynchronizationStrategyFactory getIdentitySynchronizationStrategy() {
+ return getSynchStrategyFactory("org.eclipse.ecf.sync.doc.identity");
+ }
+}

Back to the top