public interface IProjectPreference<T> extends IEclipsePreference<T>
Extends the IEclipsePreference
by adding the support for a required project nature identifier. This may be
used to make the property dependent of a specific project nature
.
Defines get
and set
methods to retrieve and set the value of
the preference.
Modifier and Type | Method and Description |
---|---|
void |
addPreferenceChangeListener(org.eclipse.core.resources.IProject project,
org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener listener)
Registers the given listener for notification of changes of this preference in specified project.
|
T |
get(org.eclipse.core.resources.IProject project)
Returns the value of the preference.
|
T |
getDefaultValueAsObject(org.eclipse.core.resources.IProject project) |
java.lang.String |
getRequiredProjectNatureId()
Return the identifier of the project nature that is required by the preference.
|
void |
removePreferenceChangeListener(org.eclipse.core.resources.IProject project,
org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener listener)
Unregisters the given listener from receiving notification of changes of this preference in specified project.
|
void |
set(org.eclipse.core.resources.IProject project,
T valueAsObject)
Set the value of the preference.
|
void |
setToDefault(org.eclipse.core.resources.IProject project) |
getDefaultValueAsString, getKey, getQualifier
java.lang.String getRequiredProjectNatureId()
T get(org.eclipse.core.resources.IProject project)
project
- the project for which the preference is retrievedIEclipsePreference.getDefaultValueAsString()
void set(org.eclipse.core.resources.IProject project, T valueAsObject)
project
- the project for which the preference is retrievedvalueAsObject
- the new value of the preferenceT getDefaultValueAsObject(org.eclipse.core.resources.IProject project)
void setToDefault(org.eclipse.core.resources.IProject project)
void addPreferenceChangeListener(org.eclipse.core.resources.IProject project, org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener listener)
null
.project
- the project in which the changes of this preference are to be observedlistener
- the preference change listener to register#removePreferenceChangeListener(IEclipsePreferences.IPreferenceChangeListener)
,
IEclipsePreferences.IPreferenceChangeListener
void removePreferenceChangeListener(org.eclipse.core.resources.IProject project, org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener listener)
null
.project
- the project in which the changes of this preference have been observedlistener
- the preference change listener to remove#addPreferenceChangeListener(IEclipsePreferences.IPreferenceChangeListener)
,
IEclipsePreferences.IPreferenceChangeListener