org.aspectj.org.eclipse.jdt.internal.core.search
Class HierarchyScope

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.core.search.AbstractSearchScope
      extended by org.aspectj.org.eclipse.jdt.internal.core.search.HierarchyScope
All Implemented Interfaces:
IJavaSearchScope, SuffixConstants

public class HierarchyScope
extends AbstractSearchScope
implements SuffixConstants

Scope limited to the subtype and supertype hierarchy of a given type.


Field Summary
protected  int elementCount
           
protected  IResource[] elements
           
 IType focusType
           
 boolean needsRefresh
           
 
Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.util.SuffixConstants
EXTENSION_aj, EXTENSION_AJ, EXTENSION_class, EXTENSION_CLASS, EXTENSION_jar, EXTENSION_JAR, EXTENSION_java, EXTENSION_JAVA, EXTENSION_zip, EXTENSION_ZIP, SUFFIX_aj, SUFFIX_AJ, SUFFIX_class, SUFFIX_CLASS, SUFFIX_jar, SUFFIX_JAR, SUFFIX_java, SUFFIX_JAVA, SUFFIX_STRING_aj, SUFFIX_STRING_AJ, SUFFIX_STRING_class, SUFFIX_STRING_CLASS, SUFFIX_STRING_jar, SUFFIX_STRING_JAR, SUFFIX_STRING_java, SUFFIX_STRING_JAVA, SUFFIX_STRING_zip, SUFFIX_STRING_ZIP, SUFFIX_zip, SUFFIX_ZIP
 
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
HierarchyScope(IType type, WorkingCopyOwner owner)
           
 
Method Summary
 void add(IResource element)
           
 boolean encloses(IJavaElement element)
          Checks whether this scope encloses the given element.
 boolean encloses(java.lang.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.
protected  void initialize()
           
 void processDelta(IJavaElementDelta delta)
           
protected  void refresh()
           
 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

focusType

public IType focusType

elements

protected IResource[] elements

elementCount

protected int elementCount

needsRefresh

public boolean needsRefresh
Constructor Detail

HierarchyScope

public HierarchyScope(IType type,
                      WorkingCopyOwner owner)
               throws JavaModelException
Throws:
JavaModelException
Method Detail

add

public void add(IResource element)

encloses

public boolean encloses(java.lang.String resourcePath)
Description copied from interface: IJavaSearchScope
Checks whether the resource at the given path is enclosed by this scope.

Specified by:
encloses in interface IJavaSearchScope
Parameters:
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.
Returns:
whether the resource is enclosed by this scope

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
Parameters:
element - the given element
Returns:
true if the element is in this scope

enclosingProjectsAndJars

public IPath[] enclosingProjectsAndJars()
Description copied from interface: IJavaSearchScope
Returns the paths to the enclosing projects and JARs for this search scope.

Specified by:
enclosingProjectsAndJars in interface IJavaSearchScope
Returns:
an array of paths to the enclosing projects and JARS.

initialize

protected void initialize()
                   throws JavaModelException
Throws:
JavaModelException

processDelta

public void processDelta(IJavaElementDelta delta)
Specified by:
processDelta in class AbstractSearchScope

refresh

protected void refresh()
                throws JavaModelException
Throws:
JavaModelException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object