|
PTP Release 7.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ptp.core.Preferences
public final class Preferences
Convenience class to facilitate using the new IEclipsePreferences story. Adapted from
org.eclipse.debug.internal.core.Preferences.
| Method Summary | |
|---|---|
static void |
addPreferenceChangeListener(java.lang.String qualifier,
IPreferenceChangeListener listener)
Adds the given preference listener to the DefaultScope and the InstanceScope |
static boolean |
contains(java.lang.String qualifier,
java.lang.String name)
Returns whether the named preference is know in the preference store. |
static boolean |
getBoolean(java.lang.String qualifier,
java.lang.String key)
Returns the value in the preference store for the given key. |
static byte[] |
getByteArray(java.lang.String qualifier,
java.lang.String key)
Returns the value in the preference store for the given key. |
static boolean |
getDefaultBoolean(java.lang.String qualifier,
java.lang.String key,
boolean defaultvalue)
Returns the default boolean value stored in the DefaultScope for
the given key or the specified default value if the key does not appear
in the DefaultScope |
static byte[] |
getDefaultByteArray(java.lang.String qualifier,
java.lang.String key,
byte[] defaultvalue)
Returns the default byte array value stored in the DefaultScope for the given key or the specified default value if
the key does not
appear in the DefaultScope |
static double |
getDefaultDouble(java.lang.String qualifier,
java.lang.String key,
double defaultvalue)
Returns the default double value stored in the DefaultScope for
the given key or the specified default value if the key does not appear
in the DefaultScope |
static float |
getDefaultFloat(java.lang.String qualifier,
java.lang.String key,
float defaultvalue)
Returns the default float value stored in the DefaultScope for
the given key or the specified default value if the key does not appear
in the DefaultScope |
static int |
getDefaultInt(java.lang.String qualifier,
java.lang.String key,
int defaultvalue)
Returns the default integer value stored in the DefaultScope for
the given key or the specified default value if the key does not appear
in the DefaultScope |
static long |
getDefaultLong(java.lang.String qualifier,
java.lang.String key,
long defaultvalue)
Returns the default long value stored in the DefaultScope for the
given key or the specified default value if the key does not appear in
the DefaultScope |
static java.lang.String |
getDefaultString(java.lang.String qualifier,
java.lang.String key,
java.lang.String defaultvalue)
Returns the default string value stored in the DefaultScope for
the given key or the specified default value if the key does not appear
in the DefaultScope |
static double |
getDouble(java.lang.String qualifier,
java.lang.String key)
Returns the value in the preference store for the given key. |
static float |
getFloat(java.lang.String qualifier,
java.lang.String key)
Returns the value in the preference store for the given key. |
static int |
getInt(java.lang.String qualifier,
java.lang.String key)
Returns the value in the preference store for the given key. |
static long |
getLong(java.lang.String qualifier,
java.lang.String key)
Returns the value in the preference store for the given key. |
static java.lang.String |
getString(java.lang.String qualifier,
java.lang.String key)
Returns the value in the preference store for the given key. |
static boolean |
isDefault(java.lang.String qualifier,
java.lang.String name)
Returns true if the named preference has the default value. |
static void |
removePreferenceChangeListener(java.lang.String qualifier,
IPreferenceChangeListener listener)
Removes the given preference listener from the DefaultScope and
the InstanceScope |
static void |
savePreferences(java.lang.String qualifier)
Save the preferences for the given plugin identifier. |
static void |
setBoolean(java.lang.String qualifier,
java.lang.String key,
boolean value)
Sets a boolean preference in the InstanceScope. |
static void |
setByteArray(java.lang.String qualifier,
java.lang.String key,
byte[] value)
Sets a byte array preference in the InstanceScope. |
static void |
setDefaultBoolean(java.lang.String qualifier,
java.lang.String key,
boolean value)
Sets a boolean in the DefaultScope |
static void |
setDefaultByteArray(java.lang.String qualifier,
java.lang.String key,
byte[] value)
Sets a byte array in the DefaultScope |
static void |
setDefaultDouble(java.lang.String qualifier,
java.lang.String key,
double value)
Sets a double in the DefaultScope |
static void |
setDefaultFloat(java.lang.String qualifier,
java.lang.String key,
float value)
Sets a float in the DefaultScope |
static void |
setDefaultInt(java.lang.String qualifier,
java.lang.String key,
int value)
Sets a integer in the DefaultScope |
static void |
setDefaultLong(java.lang.String qualifier,
java.lang.String key,
long value)
Sets a long in the DefaultScope |
static void |
setDefaultString(java.lang.String qualifier,
java.lang.String key,
java.lang.String value)
Sets a string in the DefaultScope |
static void |
setDouble(java.lang.String qualifier,
java.lang.String key,
double value)
Sets a double preference in the InstanceScope. |
static void |
setFloat(java.lang.String qualifier,
java.lang.String key,
float value)
Sets a float preference in the InstanceScope. |
static void |
setInt(java.lang.String qualifier,
java.lang.String key,
int value)
Sets a integer preference in the InstanceScope. |
static void |
setLong(java.lang.String qualifier,
java.lang.String key,
long value)
Sets a long preference in the InstanceScope. |
static void |
setString(java.lang.String qualifier,
java.lang.String key,
java.lang.String value)
Sets a string preference in the InstanceScope. |
static void |
setToDefault(java.lang.String qualifier,
java.lang.String key)
Sets the given preference to its default value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void addPreferenceChangeListener(java.lang.String qualifier,
IPreferenceChangeListener listener)
DefaultScope and the InstanceScope
qualifier - listener -
public static boolean contains(java.lang.String qualifier,
java.lang.String name)
qualifier - name -
public static boolean getBoolean(java.lang.String qualifier,
java.lang.String key)
qualifier - key -
public static byte[] getByteArray(java.lang.String qualifier,
java.lang.String key)
qualifier - key -
public static boolean getDefaultBoolean(java.lang.String qualifier,
java.lang.String key,
boolean defaultvalue)
DefaultScope for
the given key or the specified default value if the key does not appear
in the DefaultScope
qualifier - key - defaultvalue -
DefaultScope for the given
key, or the specified default value.
public static byte[] getDefaultByteArray(java.lang.String qualifier,
java.lang.String key,
byte[] defaultvalue)
DefaultScope for the given key or the specified default value if
the key does not
appear in the DefaultScope
qualifier - key - defaultvalue -
DefaultScope for the
given key, or the specified default value.
public static double getDefaultDouble(java.lang.String qualifier,
java.lang.String key,
double defaultvalue)
DefaultScope for
the given key or the specified default value if the key does not appear
in the DefaultScope
qualifier - key - defaultvalue -
DefaultScope for the given
key, or the specified default value.
public static float getDefaultFloat(java.lang.String qualifier,
java.lang.String key,
float defaultvalue)
DefaultScope for
the given key or the specified default value if the key does not appear
in the DefaultScope
qualifier - key - defaultvalue -
DefaultScope for the given
key, or the specified default value.
public static int getDefaultInt(java.lang.String qualifier,
java.lang.String key,
int defaultvalue)
DefaultScope for
the given key or the specified default value if the key does not appear
in the DefaultScope
qualifier - key - defaultvalue -
DefaultScope for the given
key, or the specified default value.
public static long getDefaultLong(java.lang.String qualifier,
java.lang.String key,
long defaultvalue)
DefaultScope for the
given key or the specified default value if the key does not appear in
the DefaultScope
qualifier - key - defaultvalue -
DefaultScope for the given key,
or the specified default value.
public static java.lang.String getDefaultString(java.lang.String qualifier,
java.lang.String key,
java.lang.String defaultvalue)
DefaultScope for
the given key or the specified default value if the key does not appear
in the DefaultScope
qualifier - key - defaultvalue -
DefaultScope for the given
key, or the specified default value.
public static double getDouble(java.lang.String qualifier,
java.lang.String key)
qualifier - key -
public static float getFloat(java.lang.String qualifier,
java.lang.String key)
qualifier - key -
public static int getInt(java.lang.String qualifier,
java.lang.String key)
qualifier - key -
public static long getLong(java.lang.String qualifier,
java.lang.String key)
qualifier - key -
public static java.lang.String getString(java.lang.String qualifier,
java.lang.String key)
qualifier - key -
public static boolean isDefault(java.lang.String qualifier,
java.lang.String name)
qualifier - name -
public static void removePreferenceChangeListener(java.lang.String qualifier,
IPreferenceChangeListener listener)
DefaultScope and
the InstanceScope
qualifier - listener - public static void savePreferences(java.lang.String qualifier)
qualifier -
public static void setBoolean(java.lang.String qualifier,
java.lang.String key,
boolean value)
InstanceScope.
qualifier - key - the keyvalue - the value
public static void setByteArray(java.lang.String qualifier,
java.lang.String key,
byte[] value)
InstanceScope.
qualifier - key - the keyvalue - the value
public static void setDefaultBoolean(java.lang.String qualifier,
java.lang.String key,
boolean value)
DefaultScope
qualifier - key - the keyvalue - the new value
public static void setDefaultByteArray(java.lang.String qualifier,
java.lang.String key,
byte[] value)
DefaultScope
qualifier - key - the keyvalue - the new value
public static void setDefaultDouble(java.lang.String qualifier,
java.lang.String key,
double value)
DefaultScope
qualifier - key - the keyvalue - the new value
public static void setDefaultFloat(java.lang.String qualifier,
java.lang.String key,
float value)
DefaultScope
qualifier - key - the keyvalue - the new value
public static void setDefaultInt(java.lang.String qualifier,
java.lang.String key,
int value)
DefaultScope
qualifier - key - the keyvalue - the new value
public static void setDefaultLong(java.lang.String qualifier,
java.lang.String key,
long value)
DefaultScope
qualifier - key - the keyvalue - the new value
public static void setDefaultString(java.lang.String qualifier,
java.lang.String key,
java.lang.String value)
DefaultScope
qualifier - key - the keyvalue - the new value
public static void setDouble(java.lang.String qualifier,
java.lang.String key,
double value)
InstanceScope.
qualifier - key - the keyvalue - the value
public static void setFloat(java.lang.String qualifier,
java.lang.String key,
float value)
InstanceScope.
qualifier - key - the keyvalue - the value
public static void setInt(java.lang.String qualifier,
java.lang.String key,
int value)
InstanceScope.
qualifier - key - the keyvalue - the value
public static void setLong(java.lang.String qualifier,
java.lang.String key,
long value)
InstanceScope.
qualifier - key - the keyvalue - the value
public static void setString(java.lang.String qualifier,
java.lang.String key,
java.lang.String value)
InstanceScope.
qualifier - key - the keyvalue - the value
public static void setToDefault(java.lang.String qualifier,
java.lang.String key)
InstanceScope. Has no effect if the given
key is null.
qualifier - key - the key for the preference
|
PTP Release 7.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||