IPreferencesSupport Interface
- public interface IPreferencesSupport
The preferences support interface is used to designate a service that has it's own preferences file that can be
accessed and modified using the java preferences API. There are generally two types of pereferences: user and system.
User preferences vary from user to user and should contain customization and state information that should not be shared.
An example of this in the IDE is font preferences and breakpoint settings. System preferences are intended to be
stored in files that are shared, perhaps checked in to source control systems. They are the same for all users of
a particular group and should change infrequently. An example is a workspace or project definition.
Subsystems within the IDE that wish to utilize the existing preferences infrastructure can create nodes using their
class. See the implementing interfaces for more information on the types of information stored in the preferences
for those implementations
-
All Known Subinterfaces
-
Application.I
, IProject
, IWorkspace
getUserObject(Class) Method
public Object
getUserObject(Class
c)
Gets a previously serialized user object.
Parameters
-
c
- Class association in the preferences file to lookup
setUserObject(Class, Serializable) Method
public void setUserObject(Class
c,
Serializable
o)
Sets an object to be serialized into the user preferences ZIP file. This is for larger objects
than you would want to save in the normal preferences XML. The object must implement
Serializable. This create a reference to the object. To remove the reference, set the to null.
Parameters
-
c
- Class association in the preferences file to lookup
-
o
- Object implementing Serializable to be saved
systemNodeForPackage(Class) Method
public Preferences
systemNodeForPackage(Class
c)
Get the preference subtree in the system preferences that corresponds to the given class. Extensions may use this
to store particular preference information about their internal preferences.
Parameters
-
c
- Class assocation in the preference file to lookup
Returns
- Preference node associated with the given class. If no such node exists, an empty one is created and returned.
systemRoot() Method
public Preferences
systemRoot()
Get the root of the system preferences object. As noted above, this contains shared preference information
Returns
- java preferences object representing the tree for the shared preferences
userNodeForPackage(Class) Method
public Preferences
userNodeForPackage(Class
c)
Get the preference subtree in the user preferences that corresponds to the given class. Extensions may use this
to store particular preference information about their internal preferences.
Parameters
-
c
- Class assocation in the preference file to lookup
Returns
- Preference node associated with the given class. If no such node exists, an empty one is created and returned.
userRoot() Method
public Preferences
userRoot()
Get the root of the user preferences object. As noted above, this contains user specific preference information
Returns
- java preferences object representing the tree for the user specific preferences