org.eclipse.core.resources
Class ProjectScope
java.lang.Object
org.eclipse.core.resources.ProjectScope
- All Implemented Interfaces:
- org.eclipse.core.runtime.preferences.IScopeContext
public final class ProjectScope
- extends java.lang.Object
- implements org.eclipse.core.runtime.preferences.IScopeContext
Object representing the project scope in the Eclipse preferences
hierarchy. Can be used as a context for searching for preference
values (in the org.eclipse.core.runtime.IPreferencesService
APIs) or for determining the correct preference node to set values in the store.
Project preferences are stored on a per project basis in the
project's content area as specified by IProject#getLocation
.
The path for preferences defined in the project scope hierarchy
is as follows: /project/<projectName>/<qualifier>
This class is not intended to be subclassed. This class may be instantiated.
- Since:
- 3.0
- See Also:
IResource.getLocation()
Field Summary |
static java.lang.String |
SCOPE
String constant (value of "project" ) used for the
scope name for this preference scope. |
Constructor Summary |
ProjectScope(IProject context)
Create and return a new project scope for the given project. |
Method Summary |
boolean |
equals(java.lang.Object obj)
|
org.eclipse.core.runtime.IPath |
getLocation()
|
java.lang.String |
getName()
|
org.eclipse.core.runtime.preferences.IEclipsePreferences |
getNode(java.lang.String qualifier)
|
int |
hashCode()
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
SCOPE
public static final java.lang.String SCOPE
- String constant (value of
"project"
) used for the
scope name for this preference scope.
- See Also:
- Constant Field Values
ProjectScope
public ProjectScope(IProject context)
- Create and return a new project scope for the given project. The given
project must not be
null
.
- Parameters:
context
- the project
- Throws:
java.lang.IllegalArgumentException
- if the project is null
getNode
public org.eclipse.core.runtime.preferences.IEclipsePreferences getNode(java.lang.String qualifier)
- Specified by:
getNode
in interface org.eclipse.core.runtime.preferences.IScopeContext
getLocation
public org.eclipse.core.runtime.IPath getLocation()
- Specified by:
getLocation
in interface org.eclipse.core.runtime.preferences.IScopeContext
getName
public java.lang.String getName()
- Specified by:
getName
in interface org.eclipse.core.runtime.preferences.IScopeContext
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object