Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Preferences.java')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Preferences.java72
1 files changed, 36 insertions, 36 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Preferences.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Preferences.java
index e79766c83..1e7995c8b 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Preferences.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Preferences.java
@@ -21,24 +21,24 @@ import org.eclipse.debug.core.DebugPlugin;
/**
* Convenience class to facilitate using the new {@link IEclipsePreferences} story
- *
+ *
* @since 3.6
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public final class Preferences {
static final IScopeContext[] contexts= new IScopeContext[] { DefaultScope.INSTANCE, InstanceScope.INSTANCE };
-
+
static final int DEFAULT_CONTEXT = 0;
static final int INSTANCE_CONTEXT = 1;
-
+
/**
* Constructor
*/
private Preferences() {
// no direct instantiation
}
-
+
/**
* Sets a string preference in the {@link InstanceScope} or the given {@link IScopeContext} if it
* is not <code>null</code>. Preferences set in a given context are flushed as they are set.
@@ -62,14 +62,14 @@ public final class Preferences {
contexts[INSTANCE_CONTEXT].getNode(qualifier).put(key, value);
}
}
-
+
/**
* Sets a boolean preference in the {@link InstanceScope} or the given {@link IScopeContext} if it
* is not <code>null</code>. Preferences set in a given context are flushed as they are set.
* @param qualifier the preference qualifier
* @param key the key
* @param value the value
- * @param context the context to set the value in
+ * @param context the context to set the value in
*/
public static synchronized void setBoolean(String qualifier, String key, boolean value, IScopeContext context) {
if(context != null) {
@@ -86,7 +86,7 @@ public final class Preferences {
contexts[INSTANCE_CONTEXT].getNode(qualifier).putBoolean(key, value);
}
}
-
+
/**
* Sets a integer preference in the {@link InstanceScope} or the given {@link IScopeContext} if it
* is not <code>null</code>. Preferences set in a given context are flushed as they are set.
@@ -110,7 +110,7 @@ public final class Preferences {
contexts[INSTANCE_CONTEXT].getNode(qualifier).putInt(key, value);
}
}
-
+
/**
* Sets a long preference in the {@link InstanceScope} or the given {@link IScopeContext} if it
* is not <code>null</code>. Preferences set in a given context are flushed as they are set.
@@ -134,7 +134,7 @@ public final class Preferences {
contexts[INSTANCE_CONTEXT].getNode(qualifier).putLong(key, value);
}
}
-
+
/**
* Sets a byte array preference in the {@link InstanceScope} or the given {@link IScopeContext} if it
* is not <code>null</code>. Preferences set in a given context are flushed as they are set.
@@ -158,7 +158,7 @@ public final class Preferences {
contexts[INSTANCE_CONTEXT].getNode(qualifier).putByteArray(key, value);
}
}
-
+
/**
* Sets a double preference in the {@link InstanceScope} or the given {@link IScopeContext} if it
* is not <code>null</code>. Preferences set in a given context are flushed as they are set.
@@ -182,7 +182,7 @@ public final class Preferences {
contexts[INSTANCE_CONTEXT].getNode(qualifier).putDouble(key, value);
}
}
-
+
/**
* Sets a float preference in the {@link InstanceScope} or the given {@link IScopeContext} if it
* is not <code>null</code>. Preferences set in a given context are flushed as they are set.
@@ -206,7 +206,7 @@ public final class Preferences {
contexts[INSTANCE_CONTEXT].getNode(qualifier).putFloat(key, value);
}
}
-
+
/**
* Sets a string in the {@link DefaultScope}
* @param qualifier the preference qualifier
@@ -216,7 +216,7 @@ public final class Preferences {
public static synchronized void setDefaultString(String qualifier, String key, String value) {
contexts[DEFAULT_CONTEXT].getNode(qualifier).put(key, value);
}
-
+
/**
* Sets a boolean in the {@link DefaultScope}
* @param qualifier the preference qualifier
@@ -226,7 +226,7 @@ public final class Preferences {
public static synchronized void setDefaultBoolean(String qualifier, String key, boolean value) {
contexts[DEFAULT_CONTEXT].getNode(qualifier).putBoolean(key, value);
}
-
+
/**
* Sets a byte array in the {@link DefaultScope}
* @param qualifier the preference qualifier
@@ -236,7 +236,7 @@ public final class Preferences {
public static synchronized void setDefaultByteArray(String qualifier, String key, byte[] value) {
contexts[DEFAULT_CONTEXT].getNode(qualifier).putByteArray(key, value);
}
-
+
/**
* Sets a double in the {@link DefaultScope}
* @param qualifier the preference qualifier
@@ -246,7 +246,7 @@ public final class Preferences {
public static synchronized void setDefaultDouble(String qualifier, String key, double value) {
contexts[DEFAULT_CONTEXT].getNode(qualifier).putDouble(key, value);
}
-
+
/**
* Sets a float in the {@link DefaultScope}
* @param qualifier the preference qualifier
@@ -256,7 +256,7 @@ public final class Preferences {
public static synchronized void setDefaultFloat(String qualifier, String key, float value) {
contexts[DEFAULT_CONTEXT].getNode(qualifier).putFloat(key, value);
}
-
+
/**
* Sets a integer in the {@link DefaultScope}
* @param qualifier the preference qualifier
@@ -266,7 +266,7 @@ public final class Preferences {
public static synchronized void setDefaultInt(String qualifier, String key, int value) {
contexts[DEFAULT_CONTEXT].getNode(qualifier).putInt(key, value);
}
-
+
/**
* Sets a long in the {@link DefaultScope}
* @param qualifier the preference qualifier
@@ -276,7 +276,7 @@ public final class Preferences {
public static synchronized void setDefaultLong(String qualifier, String key, long value) {
contexts[DEFAULT_CONTEXT].getNode(qualifier).putLong(key, value);
}
-
+
/**
* Sets the given preference to its default value. This is done by removing any set value
* from the {@link InstanceScope}. Has no effect if the given key is <code>null</code>.
@@ -288,98 +288,98 @@ public final class Preferences {
contexts[INSTANCE_CONTEXT].getNode(qualifier).remove(key);
}
}
-
+
/**
* Returns the default boolean value stored in the {@link DefaultScope} for the given key
* or the specified default value if the key does not appear in the {@link DefaultScope}
* @param qualifier the preference qualifier
* @param key the preference key
* @param defaultvalue the default value
- *
+ *
* @return the boolean value set in the {@link DefaultScope} for the given key, or the specified default value.
*/
public static synchronized boolean getDefaultBoolean(String qualifier, String key, boolean defaultvalue) {
return contexts[DEFAULT_CONTEXT].getNode(qualifier).getBoolean(key, defaultvalue);
}
-
+
/**
* Returns the default string value stored in the {@link DefaultScope} for the given key
* or the specified default value if the key does not appear in the {@link DefaultScope}
* @param qualifier the preference qualifier
* @param key the preference key
* @param defaultvalue the default value
- *
+ *
* @return the string value set in the {@link DefaultScope} for the given key, or the specified default value.
*/
public static synchronized String getDefaultString(String qualifier, String key, String defaultvalue) {
return contexts[DEFAULT_CONTEXT].getNode(qualifier).get(key, defaultvalue);
}
-
+
/**
* Returns the default byte array value stored in the {@link DefaultScope} for the given key
* or the specified default value if the key does not appear in the {@link DefaultScope}
* @param qualifier the preference qualifier
* @param key the preference key
* @param defaultvalue the default value
- *
+ *
* @return the byte array value set in the {@link DefaultScope} for the given key, or the specified default value.
*/
public static synchronized byte[] getDefaultByteArray(String qualifier, String key, byte[] defaultvalue) {
return contexts[DEFAULT_CONTEXT].getNode(qualifier).getByteArray(key, defaultvalue);
}
-
+
/**
* Returns the default integer value stored in the {@link DefaultScope} for the given key
* or the specified default value if the key does not appear in the {@link DefaultScope}
* @param qualifier the preference qualifier
* @param key the preference key
* @param defaultvalue the default value
- *
+ *
* @return the integer value set in the {@link DefaultScope} for the given key, or the specified default value.
*/
public static synchronized int getDefaultInt(String qualifier, String key, int defaultvalue) {
return contexts[DEFAULT_CONTEXT].getNode(qualifier).getInt(key, defaultvalue);
}
-
+
/**
* Returns the default long value stored in the {@link DefaultScope} for the given key
* or the specified default value if the key does not appear in the {@link DefaultScope}
* @param qualifier the preference qualifier
* @param key the preference key
* @param defaultvalue the default value
- *
+ *
* @return the long value set in the {@link DefaultScope} for the given key, or the specified default value.
*/
public static synchronized long getDefaultLong(String qualifier, String key, long defaultvalue) {
return contexts[DEFAULT_CONTEXT].getNode(qualifier).getLong(key, defaultvalue);
}
-
+
/**
* Returns the default double value stored in the {@link DefaultScope} for the given key
* or the specified default value if the key does not appear in the {@link DefaultScope}
* @param qualifier the preference qualifier
* @param key the preference key
* @param defaultvalue the default value
- *
+ *
* @return the double value set in the {@link DefaultScope} for the given key, or the specified default value.
*/
public static synchronized double getDefaultDouble(String qualifier, String key, double defaultvalue) {
return contexts[DEFAULT_CONTEXT].getNode(qualifier).getDouble(key, defaultvalue);
}
-
+
/**
* Returns the default float value stored in the {@link DefaultScope} for the given key
* or the specified default value if the key does not appear in the {@link DefaultScope}
* @param qualifier the preference qualifier
* @param key the preference key
* @param defaultvalue the default value
- *
+ *
* @return the float value set in the {@link DefaultScope} for the given key, or the specified default value.
*/
public static synchronized float getDefaultFloat(String qualifier, String key, float defaultvalue) {
return contexts[DEFAULT_CONTEXT].getNode(qualifier).getFloat(key, defaultvalue);
}
-
+
/**
* Save the preferences for the given plug-in identifier.
* It should be noted that all pending preference changes will be flushed with this method.
@@ -394,7 +394,7 @@ public final class Preferences {
DebugPlugin.log(bse);
}
}
-
+
/**
* Adds the given preference listener to the {@link DefaultScope} and the {@link InstanceScope}
* @param qualifier the preference qualifier
@@ -404,7 +404,7 @@ public final class Preferences {
contexts[DEFAULT_CONTEXT].getNode(qualifier).addPreferenceChangeListener(listener);
contexts[INSTANCE_CONTEXT].getNode(qualifier).addPreferenceChangeListener(listener);
}
-
+
/**
* Removes the given preference listener from the {@link DefaultScope} and the {@link InstanceScope}
* @param qualifier the preference qualifier

Back to the top