|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.aspectj.org.eclipse.jdt.internal.core.search.AbstractSearchScope
org.aspectj.org.eclipse.jdt.internal.core.search.AbstractJavaSearchScope
org.aspectj.org.eclipse.jdt.internal.core.search.JavaSearchScope
public class JavaSearchScope
A Java-specific scope for searching relative to one or more java elements.
| Field Summary | |
|---|---|
static AccessRuleSet |
NOT_ENCLOSED
|
protected AccessRuleSet[] |
pathRestrictions
|
| Fields inherited from interface org.aspectj.org.eclipse.jdt.core.search.IJavaSearchScope |
|---|
APPLICATION_LIBRARIES, JAR_FILE_ENTRY_SEPARATOR, REFERENCED_PROJECTS, SOURCES, SYSTEM_LIBRARIES |
| Constructor Summary | |
|---|---|
JavaSearchScope()
|
|
| Method Summary | |
|---|---|
void |
add(IJavaElement element)
Add an element to the java search scope. |
void |
add(JavaProject project,
int includeMask,
java.util.HashSet projectsToBeAdded)
Add java project all fragment roots to current java search scope. |
boolean |
encloses(IJavaElement element)
Checks whether this scope encloses the given element. |
boolean |
encloses(java.lang.String resourcePathString)
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. |
AccessRuleSet |
getAccessRuleSet(java.lang.String relativePath,
java.lang.String containerPath)
Get access rule set corresponding to a given path. |
protected void |
initialize(int size)
|
IPackageFragmentRoot |
packageFragmentRoot(java.lang.String resourcePathString,
int jarSeparatorIndex,
java.lang.String jarPath)
Returns the package fragment root corresponding to a given resource path. |
void |
processDelta(IJavaElementDelta delta,
int eventType)
|
java.lang.String |
toString()
|
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.search.AbstractSearchScope |
|---|
includesBinaries, includesClasspaths, setIncludesBinaries, setIncludesClasspaths |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected AccessRuleSet[] pathRestrictions
public static final AccessRuleSet NOT_ENCLOSED
| Constructor Detail |
|---|
public JavaSearchScope()
| Method Detail |
|---|
public void add(JavaProject project,
int includeMask,
java.util.HashSet projectsToBeAdded)
throws JavaModelException
JavaModelExceptionadd(JavaProject, IPath, int, HashSet, HashSet, IClasspathEntry)
public void add(IJavaElement element)
throws JavaModelException
element - The element we want to add to current java search scope
JavaModelException - May happen if some Java Model info are not availablepublic boolean encloses(java.lang.String resourcePathString)
IJavaSearchScope
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.
public boolean encloses(IJavaElement element)
IJavaSearchScope
element - the given element
true if the element is in this scopepublic IPath[] enclosingProjectsAndJars()
IJavaSearchScopeIResource.getFullPath()).
For example, /MyProject
IResource.getFullPath()).
For example, /MyProject/mylib.jar
public AccessRuleSet getAccessRuleSet(java.lang.String relativePath,
java.lang.String containerPath)
getAccessRuleSet in class AbstractJavaSearchScoperelativePath - The path user want to have restriction access
protected void initialize(int size)
public void processDelta(IJavaElementDelta delta,
int eventType)
processDelta in class AbstractSearchScope
public IPackageFragmentRoot packageFragmentRoot(java.lang.String resourcePathString,
int jarSeparatorIndex,
java.lang.String jarPath)
AbstractJavaSearchScope
packageFragmentRoot in class AbstractJavaSearchScoperesourcePathString - path of expected package fragment root.jarSeparatorIndex - the index of the jar separator in the resource path, or -1 if nonejarPath - the already extracted jar path, or null if none
package fragment root which path
match the given one or null if none was found.AbstractJavaSearchScope.packageFragmentRoot(String, int, String)public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||