Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.core.runtime.preferences
Interface IEclipsePreferences

All Superinterfaces:
Preferences
All Known Subinterfaces:
IExportedPreferences

public interface IEclipsePreferences
extends Preferences

This interface describes Eclipse extensions to the preference story. It provides means for both preference and node change listeners.

Clients may implement this interface.

Since:
3.0
See Also:
Preferences

Nested Class Summary
static interface IEclipsePreferences.INodeChangeListener
          A listener to be used to receive preference node change events.
static interface IEclipsePreferences.IPreferenceChangeListener
          A listener used to receive changes to preference values in the preference store.
static class IEclipsePreferences.NodeChangeEvent
          An event object which describes the details of a change in the preference node hierarchy.
static class IEclipsePreferences.PreferenceChangeEvent
          An event object describing the details of a change to a preference in the preference store.
 
Method Summary
 void accept ( IPreferenceNodeVisitor visitor)
          Accepts the given visitor.
 void addNodeChangeListener ( IEclipsePreferences.INodeChangeListener listener)
          Register the given listener for changes to this node.
 void addPreferenceChangeListener ( IEclipsePreferences.IPreferenceChangeListener listener)
          Register the given listener for notification of preference changes to this node.
  Preferences node ( String path)
          Return the preferences node with the given path.
 void removeNode ()
          Remove this node from the preference hierarchy.
 void removeNodeChangeListener ( IEclipsePreferences.INodeChangeListener listener)
          De-register the given listener from receiving event change notifications for this node.
 void removePreferenceChangeListener ( IEclipsePreferences.IPreferenceChangeListener listener)
          De-register the given listener from receiving notification of preference changes to this node.
 
Methods inherited from interface org.osgi.service.prefs. Preferences
absolutePath, childrenNames, clear, flush, get, getBoolean, getByteArray, getDouble, getFloat, getInt, getLong, keys, name, nodeExists, parent, put, putBoolean, putByteArray, putDouble, putFloat, putInt, putLong, remove, sync
 

Method Detail

addNodeChangeListener

void addNodeChangeListener(
IEclipsePreferences.INodeChangeListener listener)
Register the given listener for changes to this node. Duplicate calls to this method with the same listener will have no effect. The given listener argument must not be null.

Parameters:
listener - the node change listener to add
Throws:
IllegalStateException - if this node or an ancestor has been removed
See Also:
removeNodeChangeListener(IEclipsePreferences.INodeChangeListener), IEclipsePreferences.INodeChangeListener

removeNodeChangeListener

void removeNodeChangeListener(
IEclipsePreferences.INodeChangeListener listener)
De-register the given listener from receiving event change notifications for this node. Calling this method with a listener which is not registered has no effect. The given listener argument must not be null.

Parameters:
listener - the node change listener to remove
Throws:
IllegalStateException - if this node or an ancestor has been removed
See Also:
addNodeChangeListener(IEclipsePreferences.INodeChangeListener), IEclipsePreferences.INodeChangeListener

addPreferenceChangeListener

void addPreferenceChangeListener(
IEclipsePreferences.IPreferenceChangeListener listener)
Register the given listener for notification of preference changes to this node. Calling this method multiple times with the same listener has no effect. The given listener argument must not be null.

Parameters:
listener - the preference change listener to register
Throws:
IllegalStateException - if this node or an ancestor has been removed
See Also:
removePreferenceChangeListener(IEclipsePreferences.IPreferenceChangeListener), IEclipsePreferences.IPreferenceChangeListener

removePreferenceChangeListener

void removePreferenceChangeListener(
IEclipsePreferences.IPreferenceChangeListener listener)
De-register the given listener from receiving notification of preference changes to this node. Calling this method multiple times with the same listener has no effect. The given listener argument must not be null.

Parameters:
listener - the preference change listener to remove
Throws:
IllegalStateException - if this node or an ancestor has been removed
See Also:
addPreferenceChangeListener(IEclipsePreferences.IPreferenceChangeListener), IEclipsePreferences.IPreferenceChangeListener

removeNode

void removeNode()
                throws 
BackingStoreException
Remove this node from the preference hierarchy. If this node is the scope root, then do not remove this node, only remove this node's children.

Functionally equivalent to calling Preferences.removeNode() . See the spec of Preferences.removeNode() for more details.

Implementors must send the appropriate IEclipsePreferences.NodeChangeEvent to listeners who are registered on this node's parent.

When this node is removed, its associated preference and node change listeners should be removed as well.

Specified by:
removeNode in interface Preferences
Throws:
BackingStoreException - if there was a problem removing this node
See Also:
Preferences.removeNode() , IEclipsePreferences.NodeChangeEvent

node


Preferences node(
String path)
Return the preferences node with the given path. The given path must not be null.

See the spec of Preferences.node(String) for more details.

Note that if the node does not yet exist and is created, then the appropriate IEclipsePreferences.NodeChangeEvent must be sent to listeners who are registered at this node.

Specified by:
node in interface Preferences
Parameters:
path - the path of the node
Returns:
the node
See Also:
Preferences.node(String) , IEclipsePreferences.NodeChangeEvent

accept

void accept(
IPreferenceNodeVisitor visitor)
            throws 
BackingStoreException
Accepts the given visitor. The visitor's visit method is called with this node. If the visitor returns true, this method visits this node's children.

Parameters:
visitor - the visitor
Throws:
BackingStoreException
See Also:
IPreferenceNodeVisitor.visit(IEclipsePreferences)

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire