Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-10-06 03:05:57 -0400
committerEike Stepper2012-10-06 03:05:57 -0400
commit45db66b70cc6b5bbe9cff2779fff1c599b82093a (patch)
treeac599cc69a25a8660e738aca3bbfdf558dbcff91
parenta302486e67a1b0ddd4726192147032c66a5ad3e1 (diff)
downloadcdo-45db66b70cc6b5bbe9cff2779fff1c599b82093a.tar.gz
cdo-45db66b70cc6b5bbe9cff2779fff1c599b82093a.tar.xz
cdo-45db66b70cc6b5bbe9cff2779fff1c599b82093a.zip
[391286] Preferences of org.eclipse.emf.cdo are not loaded/saved
https://bugs.eclipse.org/bugs/show_bug.cgi?id=391286
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/bundle/Activator.java2
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/pref/ArrayPreference.java7
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/pref/Preference.java8
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/OSGiActivator.java16
4 files changed, 32 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/bundle/Activator.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/bundle/Activator.java
index fa01e4d3a1..ef1f4edce9 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/bundle/Activator.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/bundle/Activator.java
@@ -117,6 +117,7 @@ public final class Activator extends EMFPlugin
*/
protected void doStart() throws Exception
{
+ OSGiActivator.start(OM.BUNDLE);
CDOViewProviderRegistryImpl.INSTANCE.activate();
}
@@ -126,6 +127,7 @@ public final class Activator extends EMFPlugin
protected void doStop() throws Exception
{
LifecycleUtil.deactivate(CDOViewProviderRegistryImpl.INSTANCE, OMLogger.Level.WARN);
+ OSGiActivator.stop(OM.BUNDLE);
}
@SuppressWarnings("deprecation")
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/pref/ArrayPreference.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/pref/ArrayPreference.java
index 46475d7bd5..c897ac70c3 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/pref/ArrayPreference.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/pref/ArrayPreference.java
@@ -15,6 +15,7 @@ import org.eclipse.net4j.internal.util.bundle.OM;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
+import java.util.Arrays;
/**
* @author Eike Stepper
@@ -92,4 +93,10 @@ public final class ArrayPreference extends Preference<String[]>
{
return Type.ARRAY;
}
+
+ @Override
+ public String toString()
+ {
+ return getName() + " = " + Arrays.asList(getValue());
+ }
}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/pref/Preference.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/pref/Preference.java
index 9220d6d23c..8353601f09 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/pref/Preference.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/pref/Preference.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Eike Stepper - initial API and implementation
*/
@@ -93,6 +93,12 @@ public abstract class Preference<T> implements OMPreference<T>
return setValue(defaultValue);
}
+ @Override
+ public String toString()
+ {
+ return getName() + " = " + getValue();
+ }
+
protected boolean equals(T v1, T v2)
{
return ObjectUtil.equals(v1, v2);
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/OSGiActivator.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/OSGiActivator.java
index 9d450a5d3a..7132775c85 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/OSGiActivator.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/OSGiActivator.java
@@ -148,6 +148,22 @@ public abstract class OSGiActivator implements BundleActivator
}
/**
+ * @since 3.3
+ */
+ public static void start(OMBundle bundle) throws Exception
+ {
+ ((AbstractBundle)bundle).start();
+ }
+
+ /**
+ * @since 3.3
+ */
+ public static void stop(OMBundle bundle) throws Exception
+ {
+ ((AbstractBundle)bundle).stop();
+ }
+
+ /**
* @since 2.0
*/
public static void traceStart(BundleContext context)

Back to the top