Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipse-dev] Eclipse Preference APIs



*NEW*  The Preferences Dynamic Team has reviewed the current Preference
APIs and identified potential problem areas in terms of API ambiguity or
backwards compatibility.  Please take a few minutes and check to see if any
of these situations apply to your plug-ins and make changes if necessary.

1). Preference Change Listeners/Events

Depending on the method that caused it, (e.g. import, setting the value
regularly, etc) the object types included in preference change events are
sometimes strings and sometimes wrapped objects (e.g. Integer for int, etc)
This has been the behaviour since Eclipse 1.0 and the spec has been updated
to clarify that clients should write their change listeners to handle both
cases.

The clarification has been added to the following classes/methods:
    org.eclipse.core.runtime.Preferences.IPropertyChangeListener
    org.eclipse.jface.preference.IPreferenceStore#addPropertyChangeListener


2). org.eclipse.jface.IPreferenceStore#putValue

This method sets values in the preference store and does not send
notification to registered preference change listeners. (this has been this
way since Eclipse 2.0)  This can cause problems for clients who expect to
get change events. The spec has been updated to say that clients should
only use this method on private preference keys and not public API keys
since other plug-ins may be listening to changes.


Thanks.

      the Preference Dynamic Team



Back to the top