|
Eclipse JDT 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An IJavaSearchScope
defines where search result should be found by a
SearchEngine
. Clients must pass an instance of this interface
to the search(...)
methods. Such an instance can be created using the
following factory methods on SearchEngine
: createHierarchyScope(IType)
,
createJavaSearchScope(IResource[])
, createWorkspaceScope()
, or
clients may choose to implement this interface.
Field Summary | |
static String |
JAR_FILE_ENTRY_SEPARATOR
This constant defines the separator of the resourcePath string of the encloses(String)
method. |
Method Summary | |
boolean |
encloses(IJavaElement element)
Checks whether this scope encloses the given element. |
boolean |
encloses(String resourcePath)
Checks whether the resource at the given path is enclosed by this scope. |
IPath[] |
enclosingProjectsAndJars()
Returns the paths to the enclosing projects and JARs for this search scope. |
boolean |
includesBinaries()
Deprecated. |
boolean |
includesClasspaths()
Deprecated. |
void |
setIncludesBinaries(boolean includesBinaries)
Deprecated. Use SearchEngine.createJavaSearchScope(IJavaElement[]) with the package fragment roots that correspond to the binaries instead |
void |
setIncludesClasspaths(boolean includesClasspaths)
Deprecated. Use SearchEngine.createJavaSearchScope(IJavaElement[]) with a java project instead |
Field Detail |
public static final String JAR_FILE_ENTRY_SEPARATOR
encloses(String)
method. If present in the string, it separates the path to the jar file from the path
to the .class file in the jar.
Method Detail |
public boolean encloses(String resourcePath)
resourcePath
- 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.
public boolean encloses(IJavaElement element)
element
- the element
true
if the element is in this scopepublic IPath[] enclosingProjectsAndJars()
public boolean includesBinaries()
.class
files (either
in folders or within JARs).
.class
filespublic boolean includesClasspaths()
public void setIncludesBinaries(boolean includesBinaries)
.class
files (either
in folders or within JARs).
includesBinaries
- whether this scope contains any .class
filespublic void setIncludesClasspaths(boolean includesClasspaths)
|
Eclipse JDT 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |