Class PatternSearchJob

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.search.PatternSearchJob
All Implemented Interfaces:
IJob
Direct Known Subclasses:
SubTypeSearchJob

public class PatternSearchJob extends Object implements IJob
  • Field Details

    • pattern

      protected final SearchPattern pattern
    • scope

      protected final IJavaSearchScope scope
    • participant

      protected final SearchParticipant participant
    • requestor

      protected final IndexQueryRequestor requestor
    • resolveDocumentForJar

      protected final boolean resolveDocumentForJar
    • resolveDocumentForSourceFiles

      protected final boolean resolveDocumentForSourceFiles
    • areIndexesReady

      protected volatile boolean areIndexesReady
    • executionTime

      protected final AtomicLong executionTime
    • ENABLE_PARALLEL_SEARCH_DEFAULT

      public static final boolean ENABLE_PARALLEL_SEARCH_DEFAULT
      See Also:
  • Constructor Details

    • PatternSearchJob

      public PatternSearchJob(SearchPattern pattern, SearchParticipant participant, IJavaSearchScope scope, IndexQueryRequestor requestor)
    • PatternSearchJob

      public PatternSearchJob(SearchPattern pattern, SearchParticipant participant, IJavaSearchScope scope, boolean resolveDocumentForJar, boolean resolveDocumentForSourceFiles, IndexQueryRequestor requestor)
      Create a search job with the specified search pattern.
      Parameters:
      resolveDocumentForJar - whether to resolve the document name of a result entry if it comes to a JAR library.
      resolveDocumentForSourceFiles - whether to resolve the document name of a result entry if it comes from a project's source files.
  • Method Details

    • belongsTo

      public boolean belongsTo(String jobFamily)
      Description copied from interface: IJob
      Answer true if the job belongs to a given family (tag)
      Specified by:
      belongsTo in interface IJob
    • cancel

      public void cancel()
      Description copied from interface: IJob
      Asks this job to cancel its execution. The cancellation can take an undertermined amount of time.
      Specified by:
      cancel in interface IJob
    • ensureReadyToRun

      public void ensureReadyToRun()
      Description copied from interface: IJob
      Ensures that this job is ready to run.
      Specified by:
      ensureReadyToRun in interface IJob
    • execute

      public boolean execute(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
      Description copied from interface: IJob
      Execute the current job, answer whether it was successful.
      Specified by:
      execute in interface IJob
    • getIndexes

      public Index[] getIndexes(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
    • waitNeeded

      public boolean waitNeeded()
      Description copied from interface: IJob
      Answers if we need some sleep after index write operations. Default implementation returns false.
      Specified by:
      waitNeeded in interface IJob
      Returns:
      true if the job manager should sleep a bit after this job is done to avoid IO tasks overloading OS (which could cause UI freezes etc).
    • getJobFamily

      public String getJobFamily()
      Description copied from interface: IJob
      Returns this job's family
      Specified by:
      getJobFamily in interface IJob
    • search

      public boolean search(Index index, IndexQueryRequestor queryRequestor, org.eclipse.core.runtime.IProgressMonitor progressMonitor, boolean parallel)
    • toString

      public String toString()
      Overrides:
      toString in class Object