Klasse HierarchyScope

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.search.AbstractSearchScope
org.aspectj.org.eclipse.jdt.internal.core.search.HierarchyScope
Alle implementierten Schnittstellen:
Cloneable, IJavaSearchScope, IParallelizable, SuffixConstants

public class HierarchyScope extends AbstractSearchScope implements SuffixConstants
Scope limited to the subtype and supertype hierarchy of a given type.
  • Felddetails

    • focusType

      public IType focusType
    • elements

      protected Set<String> elements
    • elementCount

      protected int elementCount
    • needsRefresh

      public boolean needsRefresh
  • Konstruktordetails

    • HierarchyScope

      public HierarchyScope(IJavaProject project, IType type, WorkingCopyOwner owner, boolean onlySubtypes, boolean noMembersOrEnclosingTypes, boolean includeFocusType) throws JavaModelException
      Creates a new hierarchy scope for the given type with the given configuration options.
      Parameter:
      project - constrain the search result to this project, or null if search should consider all types in the workspace
      type - the focus type of the hierarchy
      owner - the owner of working copies that take precedence over original compilation units, or null if the primary working copy owner should be used
      onlySubtypes - if true search only subtypes of 'type'
      noMembersOrEnclosingTypes - if true the hierarchy is strict, i.e., no additional member types or enclosing types of types spanning the hierarchy are included, otherwise all member and enclosing types of types in the hierarchy are included.
      includeFocusType - if true the focus type type is included in the resulting scope, otherwise it is excluded
      Löst aus:
      JavaModelException
    • HierarchyScope

      public HierarchyScope(IType type, WorkingCopyOwner owner) throws JavaModelException
      Löst aus:
      JavaModelException
  • Methodendetails

    • add

      public void add(org.eclipse.core.resources.IResource element)
    • encloses

      public boolean encloses(String resourcePath)
      Beschreibung aus Schnittstelle kopiert: IJavaSearchScope
      Checks whether the resource at the given path is enclosed by this scope.
      Angegeben von:
      encloses in Schnittstelle IJavaSearchScope
      Parameter:
      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.
      Gibt zurück:
      whether the resource is enclosed by this scope
    • encloses

      public boolean encloses(String resourcePath, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
    • enclosesFineGrained

      public boolean enclosesFineGrained(IJavaElement element)
      Optionally perform additional checks after element has already passed matching based on index/documents.
      Parameter:
      element - the given element
      Gibt zurück:
      true if the element is enclosed or if no fine grained checking (regarding subtypes and members) is requested
    • encloses

      public boolean encloses(IJavaElement element)
      Beschreibung aus Schnittstelle kopiert: IJavaSearchScope
      Checks whether this scope encloses the given element.
      Angegeben von:
      encloses in Schnittstelle IJavaSearchScope
      Parameter:
      element - the given element
      Gibt zurück:
      true if the element is in this scope
    • encloses

      public boolean encloses(IJavaElement element, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
    • enclosingProjectsAndJars

      public org.eclipse.core.runtime.IPath[] enclosingProjectsAndJars()
      Beschreibung aus Schnittstelle kopiert: 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
      Angegeben von:
      enclosingProjectsAndJars in Schnittstelle IJavaSearchScope
      Gibt zurück:
      an array of paths to the enclosing projects and JARS.
    • initialize

      protected void initialize() throws JavaModelException
      Löst aus:
      JavaModelException
    • initialize

      protected void initialize(org.eclipse.core.runtime.IProgressMonitor progressMonitor) throws JavaModelException
      Löst aus:
      JavaModelException
    • processDelta

      public void processDelta(IJavaElementDelta delta, int eventType)
      Angegeben von:
      processDelta in Klasse AbstractSearchScope
    • refresh

      protected void refresh() throws JavaModelException
      Löst aus:
      JavaModelException
    • refresh

      protected void refresh(org.eclipse.core.runtime.IProgressMonitor progressMonitor) throws JavaModelException
      Löst aus:
      JavaModelException
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • isParallelSearchSupported

      public boolean isParallelSearchSupported()
      Beschreibung aus Schnittstelle kopiert: IParallelizable
      Answers true if the current instance supports parallel index search
      Angegeben von:
      isParallelSearchSupported in Schnittstelle IParallelizable
      Setzt außer Kraft:
      isParallelSearchSupported in Klasse AbstractSearchScope
      Gibt zurück:
      Returns true if the implementation is safe to be used in a parallel search.
    • initBeforeSearch

      public void initBeforeSearch(org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException
      Beschreibung aus Schnittstelle kopiert: IParallelizable
      Initialize all needed data before search is started
      Angegeben von:
      initBeforeSearch in Schnittstelle IParallelizable
      Parameter:
      monitor - non null progress callback
      Löst aus:
      JavaModelException