Class PatternSearchJob
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.search.PatternSearchJob
- All Implemented Interfaces:
IJob
- Direct Known Subclasses:
SubTypeSearchJob
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanstatic final Stringstatic final booleanprotected final AtomicLongprotected final SearchParticipantprotected final SearchPatternprotected final IndexQueryRequestorprotected final booleanprotected final booleanprotected final IJavaSearchScopeFields inherited from interface IJob
CancelIfNotReady, COMPLETE, FAILED, ForceImmediate, WaitUntilReady -
Constructor Summary
ConstructorsConstructorDescriptionPatternSearchJob(SearchPattern pattern, SearchParticipant participant, IJavaSearchScope scope, boolean resolveDocumentForJar, boolean resolveDocumentForSourceFiles, IndexQueryRequestor requestor) Create a search job with the specified search pattern.PatternSearchJob(SearchPattern pattern, SearchParticipant participant, IJavaSearchScope scope, IndexQueryRequestor requestor) -
Method Summary
Modifier and TypeMethodDescriptionbooleanAnswer true if the job belongs to a given family (tag)voidcancel()Asks this job to cancel its execution.voidEnsures that this job is ready to run.booleanexecute(org.eclipse.core.runtime.IProgressMonitor progressMonitor) Execute the current job, answer whether it was successful.Index[]getIndexes(org.eclipse.core.runtime.IProgressMonitor progressMonitor) Returns this job's familybooleansearch(Index index, IndexQueryRequestor queryRequestor, org.eclipse.core.runtime.IProgressMonitor progressMonitor, boolean parallel) toString()booleanAnswers if we need some sleep after index write operations.
-
Field Details
-
pattern
-
scope
-
participant
-
requestor
-
resolveDocumentForJar
protected final boolean resolveDocumentForJar -
resolveDocumentForSourceFiles
protected final boolean resolveDocumentForSourceFiles -
areIndexesReady
protected volatile boolean areIndexesReady -
executionTime
-
ENABLE_PARALLEL_SEARCH
- See Also:
-
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
-
cancel
-
ensureReadyToRun
public void ensureReadyToRun()Description copied from interface:IJobEnsures that this job is ready to run.- Specified by:
ensureReadyToRunin interfaceIJob
-
execute
-
getIndexes
-
waitNeeded
public boolean waitNeeded()Description copied from interface:IJobAnswers if we need some sleep after index write operations. Default implementation returnsfalse.- Specified by:
waitNeededin interfaceIJob- 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
Description copied from interface:IJobReturns this job's family- Specified by:
getJobFamilyin interfaceIJob
-
search
public boolean search(Index index, IndexQueryRequestor queryRequestor, org.eclipse.core.runtime.IProgressMonitor progressMonitor, boolean parallel) -
toString
-