org.aspectj.org.eclipse.jdt.internal.core.search
Class JavaWorkspaceScope
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.search.AbstractSearchScope
org.aspectj.org.eclipse.jdt.internal.core.search.JavaSearchScope
org.aspectj.org.eclipse.jdt.internal.core.search.JavaWorkspaceScope
- All Implemented Interfaces:
- IJavaSearchScope
public class JavaWorkspaceScope
- extends JavaSearchScope
A Java-specific scope for searching the entire workspace.
The scope can be configured to not search binaries. By default, binaries
are included.
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
needsInitialize
protected boolean needsInitialize
JavaWorkspaceScope
public JavaWorkspaceScope()
encloses
public boolean encloses(IJavaElement element)
- Description copied from interface:
IJavaSearchScope
- Checks whether this scope encloses the given element.
- Specified by:
encloses in interface IJavaSearchScope- Overrides:
encloses in class JavaSearchScope
- Parameters:
element - the given element
- Returns:
true if the element is in this scope
encloses
public boolean encloses(java.lang.String resourcePathString)
- Description copied from interface:
IJavaSearchScope
- Checks whether the resource at the given path is enclosed by this scope.
- Specified by:
encloses in interface IJavaSearchScope- Overrides:
encloses in class JavaSearchScope
- Parameters:
resourcePathString - if the resource is contained in
a JAR file, the path is composed of 2 paths separated
by JAR_FILE_ENTRY_SEPARATOR: the first path is the full OS path
to the JAR (if it is an external JAR), or the workspace relative IPath
to the JAR (if it is an internal JAR),
the second path is the path to the resource inside the JAR.
- Returns:
- whether the resource is enclosed by this scope
enclosingProjectsAndJars
public IPath[] enclosingProjectsAndJars()
- Description copied from interface:
IJavaSearchScope
- Returns the paths to the enclosing projects and JARs for this search scope.
- If the path is a project path, this is the full path of the project
(see
IResource.getFullPath()).
For example, /MyProject
- If the path is a JAR path and this JAR is internal to the workspace,
this is the full path of the JAR file (see
IResource.getFullPath()).
For example, /MyProject/mylib.jar
- If the path is a JAR path and this JAR is external to the workspace,
this is the full OS path to the JAR file on the file system.
For example, d:\libs\mylib.jar
- Specified by:
enclosingProjectsAndJars in interface IJavaSearchScope- Overrides:
enclosingProjectsAndJars in class JavaSearchScope
- Returns:
- an array of paths to the enclosing projects and JARS.
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
getAccessRuleSet
public AccessRuleSet getAccessRuleSet(java.lang.String relativePath,
java.lang.String containerPath)
- Description copied from class:
JavaSearchScope
- Get access rule set corresponding to a given path.
- Overrides:
getAccessRuleSet in class JavaSearchScope
- Parameters:
relativePath - The path user want to have restriction access
- Returns:
- The access rule set for given path or null if none is set for it.
Returns specific uninit access rule set when scope does not enclose the given path.
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
initialize
public void initialize(int size)
- Overrides:
initialize in class JavaSearchScope
processDelta
public void processDelta(IJavaElementDelta delta)
- Overrides:
processDelta in class JavaSearchScope
toString
public java.lang.String toString()
- Overrides:
toString in class JavaSearchScope