Klasse IndexManager
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.search.processing.JobManager
org.aspectj.org.eclipse.jdt.internal.core.search.indexing.IndexManager
- Alle implementierten Schnittstellen:
Runnable,IIndexConstants
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic booleanstatic final Stringstatic final Stringstatic final Integerstatic final Integerstatic final Integerstatic final Integerstatic final IntegerVon Klasse geerbte Felder org.aspectj.org.eclipse.jdt.internal.core.search.processing.JobManager
activated, awaitingJobs, executing, processingThread, progressJob, VERBOSEVon Schnittstelle geerbte Felder org.aspectj.org.eclipse.jdt.internal.core.search.indexing.IIndexConstants
AND_PATTERN, ANNOT_REF_PATTERN, ANNOTATION_REF, ANNOTATION_TYPE_SUFFIX, CLASS_AND_ENUM_SUFFIX, CLASS_AND_INTERFACE_SUFFIX, CLASS_SUFFIX, CONSTRUCTOR_DECL, CONSTRUCTOR_PATTERN, CONSTRUCTOR_REF, COUNTS, DEFAULT_CONSTRUCTOR, ENUM_SUFFIX, FIELD_DECL, FIELD_PATTERN, INTERFACE_AND_ANNOTATION_SUFFIX, INTERFACE_SUFFIX, LOCAL_VAR_PATTERN, META_INDEX_CATEGORIES, META_INDEX_QUALIFIED_SUPER_TYPE_QUALIFIER_REF, META_INDEX_QUALIFIED_TYPE_QUALIFIER_REF, META_INDEX_SIMPLE_SUPER_TYPE_QUALIFIER_REF, META_INDEX_SIMPLE_TYPE_QUALIFIER_REF, METHOD_DECL, METHOD_DECL_PLUS, METHOD_PATTERN, METHOD_REF, MODULE_DECL, MODULE_INFO, MODULE_PATTERN, MODULE_REF, OBJECT, ONE_STAR, ONE_STAR_CHAR, ONE_ZERO, ONE_ZERO_CHAR, OR_PATTERN, PARAMETER_SEPARATOR, PKG_DECL_PATTERN, PKG_REF_PATTERN, REF, SECONDARY_SUFFIX, SEPARATOR, SUPER_REF, SUPER_REF_PATTERN, TYPE_DECL, TYPE_DECL_PATTERN, TYPE_PARAM_PATTERN, TYPE_REF_PATTERN, TYPE_SUFFIX, ZERO_CHAR -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaboutToUpdateIndex(org.eclipse.core.runtime.IPath containerPath, Integer newIndexState) voidaddBinary(org.eclipse.core.resources.IFile resource, org.eclipse.core.runtime.IPath containerPath) Trigger addition of a resource to an index Note: the actual operation is performed in backgroundvoidaddSource(org.eclipse.core.resources.IFile resource, org.eclipse.core.runtime.IPath containerPath, SourceElementParser parser) Trigger addition of a resource to an index Note: the actual operation is performed in backgroundvoidcomputeIndexLocation(org.eclipse.core.runtime.IPath containerPath) computeIndexLocation(org.eclipse.core.runtime.IPath containerPath, URL newIndexURL) Compute the pre-built index location for a specified URLfinal voidvoiddeleteIndexFiles(org.eclipse.core.runtime.IProgressMonitor monitor) voidensureIndexExists(IndexLocation indexLocation, org.eclipse.core.runtime.IPath containerPath) getIndex(IndexLocation indexLocation) Returns the index for a given index locationgetIndex(org.eclipse.core.runtime.IPath containerPath, boolean reuseExistingFile, boolean createIfMissing) Returns the index for a given project, according to the following algorithm: - if index is already in memory: answers this one back - if (reuseExistingFile) then read it and return this index and record it in memory - if (createIfMissing) then create a new empty index and record it in memory Warning: Does not check whether index is consistent (not being used)getIndex(org.eclipse.core.runtime.IPath containerPath, IndexLocation indexLocation, boolean reuseExistingFile, boolean createIfMissing) Returns the index for a given project, according to the following algorithm: - if index is already in memory: answers this one back - if (reuseExistingFile) then read it and return this index and record it in memory - if (createIfMissing) then create a new empty index and record it in memory Warning: Does not check whether index is consistent (not being used)Index[]getIndexes(IndexLocation[] locations, org.eclipse.core.runtime.IProgressMonitor progressMonitor) Returns all the existing indexes for a list of index locations.getIndexForUpdate(org.eclipse.core.runtime.IPath containerPath, boolean reuseExistingFile, boolean createIfMissing) getSourceElementParser(IJavaProject project, ISourceElementRequestor requestor) voidindexAll(org.eclipse.core.resources.IProject project) Trigger addition of the entire content of a project Note: the actual operation is performed in backgroundvoidindexDocument(SearchDocument searchDocument, SearchParticipant searchParticipant, Index index, org.eclipse.core.runtime.IPath indexLocation) voidindexLibrary(org.eclipse.core.runtime.IPath path, org.eclipse.core.resources.IProject requestingProject, URL indexURL) voidindexLibrary(org.eclipse.core.runtime.IPath path, org.eclipse.core.resources.IProject requestingProject, URL indexURL, boolean updateIndex) Trigger addition of a library to an index Note: the actual operation is performed in backgroundvoidindexResolvedDocument(SearchDocument searchDocument, SearchParticipant searchParticipant, Index index, org.eclipse.core.runtime.IPath indexLocation) voidindexSourceFolder(JavaProject javaProject, org.eclipse.core.runtime.IPath sourceFolder, char[][] inclusionPatterns, char[][] exclusionPatterns) Index the content of the given source folder.voidjobWasCancelled(org.eclipse.core.runtime.IPath containerPath) protected voidAdvance to the next available job, once the current one has been completed.protected voidnotifyIdle(long idlingTime) No more job awaiting.Name of the background processrecreateIndex(org.eclipse.core.runtime.IPath containerPath) Recreates the index for a given path, keeping the same read-write monitor.voidTrigger removal of a resource to an index Note: the actual operation is performed in backgroundvoidremoveIndex(org.eclipse.core.runtime.IPath containerPath) Removes the index for a given path.voidremoveIndexFamily(org.eclipse.core.runtime.IPath path) Removes all indexes whose paths start with (or are equal to) the given path.voidremoveIndexPath(org.eclipse.core.runtime.IPath path) Removes all indexes whose paths start with (or are equal to) the given path.voidremoveSourceFolderFromIndex(JavaProject javaProject, org.eclipse.core.runtime.IPath sourceFolder, char[][] inclusionPatterns, char[][] exclusionPatterns) Remove the content of the given source folder from the index.voidreset()Flush current statebooleanresetIndex(org.eclipse.core.runtime.IPath containerPath) Resets the index for a given path.voidvoidCommit all index memory changes to diskvoidsavePreBuiltIndex(Index index) saveIndex(Index)will only update the state if there are no other jobs running against the same underlying resource for this index.voidscheduleDocumentIndexing(SearchDocument searchDocument, org.eclipse.core.runtime.IPath container, IndexLocation indexLocation, SearchParticipant searchParticipant) toString()voidupdateParticipant(org.eclipse.core.runtime.IPath indexPath, org.eclipse.core.runtime.IPath containerPath) org.eclipse.core.runtime.IStatuswaitForIndex(boolean enableIndexer, org.eclipse.core.runtime.IProgressMonitor monitor) Waits until all indexing jobs are done or given monitor is cancelled.Von Klasse geerbte Methoden org.aspectj.org.eclipse.jdt.internal.core.search.processing.JobManager
activateProcessing, awaitingJobsCount, currentJob, currentJobForced, disable, discardJobs, enable, isEnabled, isJobWaiting, performConcurrentJob, request, requestIfNotWaiting, run, shutdown
-
Felddetails
-
indexLocations
-
SAVED_STATE
-
UPDATING_STATE
-
UNKNOWN_STATE
-
REBUILDING_STATE
-
REUSE_STATE
-
MANAGE_PRODUCT_INDEXES_PROPERTY
- Siehe auch:
-
INDEX_MANAGER_NOTIFY_IDLE_WAIT_PROPERTY
- Siehe auch:
-
DEBUG
public static boolean DEBUG
-
-
Konstruktordetails
-
IndexManager
public IndexManager()
-
-
Methodendetails
-
waitForIndex
public org.eclipse.core.runtime.IStatus waitForIndex(boolean enableIndexer, org.eclipse.core.runtime.IProgressMonitor monitor) Waits until all indexing jobs are done or given monitor is cancelled.- Parameter:
enableIndexer-trueif this method should temporarily enable index manager and disable it again at the end (if the index manager was disabled before calling this method). Iffalseis given and index manager is disabled, this method will block until index manager will be enabled again.monitor- for cancellation- Gibt zurück:
Status#CANCEL_STATUSif the waiting was cancelled,Status#OK_STATUSotherwise
-
aboutToUpdateIndex
-
addBinary
public void addBinary(org.eclipse.core.resources.IFile resource, org.eclipse.core.runtime.IPath containerPath) Trigger addition of a resource to an index Note: the actual operation is performed in background -
addSource
public void addSource(org.eclipse.core.resources.IFile resource, org.eclipse.core.runtime.IPath containerPath, SourceElementParser parser) Trigger addition of a resource to an index Note: the actual operation is performed in background -
cleanUpIndexes
public void cleanUpIndexes() -
computeIndexLocation
public IndexLocation computeIndexLocation(org.eclipse.core.runtime.IPath containerPath, URL newIndexURL) Compute the pre-built index location for a specified URL -
computeIndexLocation
-
deleteIndexFiles
public final void deleteIndexFiles() -
deleteIndexFiles
public void deleteIndexFiles(org.eclipse.core.runtime.IProgressMonitor monitor) -
ensureIndexExists
public void ensureIndexExists(IndexLocation indexLocation, org.eclipse.core.runtime.IPath containerPath) -
getSourceElementParser
public SourceElementParser getSourceElementParser(IJavaProject project, ISourceElementRequestor requestor) -
getIndex
Returns the index for a given index location- Parameter:
indexLocation- The path of the index file- Gibt zurück:
- The corresponding index or
nullif not found
-
getIndex
public Index getIndex(org.eclipse.core.runtime.IPath containerPath, boolean reuseExistingFile, boolean createIfMissing) Returns the index for a given project, according to the following algorithm: - if index is already in memory: answers this one back - if (reuseExistingFile) then read it and return this index and record it in memory - if (createIfMissing) then create a new empty index and record it in memory Warning: Does not check whether index is consistent (not being used) -
getIndex
public Index getIndex(org.eclipse.core.runtime.IPath containerPath, IndexLocation indexLocation, boolean reuseExistingFile, boolean createIfMissing) Returns the index for a given project, according to the following algorithm: - if index is already in memory: answers this one back - if (reuseExistingFile) then read it and return this index and record it in memory - if (createIfMissing) then create a new empty index and record it in memory Warning: Does not check whether index is consistent (not being used) -
getIndexes
public Index[] getIndexes(IndexLocation[] locations, org.eclipse.core.runtime.IProgressMonitor progressMonitor) Returns all the existing indexes for a list of index locations. Note that this may trigger some indexes recreation work- Parameter:
locations- The list of of the index files path- Gibt zurück:
- The corresponding indexes list.
-
getIndexForUpdate
public Index getIndexForUpdate(org.eclipse.core.runtime.IPath containerPath, boolean reuseExistingFile, boolean createIfMissing) -
indexDocument
public void indexDocument(SearchDocument searchDocument, SearchParticipant searchParticipant, Index index, org.eclipse.core.runtime.IPath indexLocation) -
indexResolvedDocument
public void indexResolvedDocument(SearchDocument searchDocument, SearchParticipant searchParticipant, Index index, org.eclipse.core.runtime.IPath indexLocation) -
indexAll
public void indexAll(org.eclipse.core.resources.IProject project) Trigger addition of the entire content of a project Note: the actual operation is performed in background -
indexLibrary
public void indexLibrary(org.eclipse.core.runtime.IPath path, org.eclipse.core.resources.IProject requestingProject, URL indexURL) -
indexLibrary
public void indexLibrary(org.eclipse.core.runtime.IPath path, org.eclipse.core.resources.IProject requestingProject, URL indexURL, boolean updateIndex) Trigger addition of a library to an index Note: the actual operation is performed in background -
indexSourceFolder
public void indexSourceFolder(JavaProject javaProject, org.eclipse.core.runtime.IPath sourceFolder, char[][] inclusionPatterns, char[][] exclusionPatterns) Index the content of the given source folder. -
jobWasCancelled
public void jobWasCancelled(org.eclipse.core.runtime.IPath containerPath) -
moveToNextJob
protected void moveToNextJob()Advance to the next available job, once the current one has been completed. Note: clients awaiting until the job count is zero are still waiting at this point.- Setzt außer Kraft:
moveToNextJobin KlasseJobManager
-
notifyIdle
protected void notifyIdle(long idlingTime) No more job awaiting.- Setzt außer Kraft:
notifyIdlein KlasseJobManager
-
processName
Name of the background process- Angegeben von:
processNamein KlasseJobManager
-
recreateIndex
Recreates the index for a given path, keeping the same read-write monitor. Returns the new empty index or null if it didn't exist before. Warning: Does not check whether index is consistent (not being used) -
remove
Trigger removal of a resource to an index Note: the actual operation is performed in background -
removeIndex
public void removeIndex(org.eclipse.core.runtime.IPath containerPath) Removes the index for a given path. This is a no-op if the index did not exist. -
removeIndexPath
public void removeIndexPath(org.eclipse.core.runtime.IPath path) Removes all indexes whose paths start with (or are equal to) the given path. -
removeIndexFamily
public void removeIndexFamily(org.eclipse.core.runtime.IPath path) Removes all indexes whose paths start with (or are equal to) the given path. -
removeSourceFolderFromIndex
public void removeSourceFolderFromIndex(JavaProject javaProject, org.eclipse.core.runtime.IPath sourceFolder, char[][] inclusionPatterns, char[][] exclusionPatterns) Remove the content of the given source folder from the index. -
reset
public void reset()Flush current state- Setzt außer Kraft:
resetin KlasseJobManager
-
resetIndex
public boolean resetIndex(org.eclipse.core.runtime.IPath containerPath) Resets the index for a given path. Returns true if the index was reset, false otherwise. -
savePreBuiltIndex
saveIndex(Index)will only update the state if there are no other jobs running against the same underlying resource for this index. Pre-built indexes must be in aREUSE_STATEstate even if there is another job to run against it as the subsequent job will find the index and not save it in the right state. Refer to https://bugs.eclipse.org/bugs/show_bug.cgi?id=405932- Löst aus:
IOException
-
saveIndex
- Löst aus:
IOException
-
saveIndexes
public void saveIndexes()Commit all index memory changes to disk -
scheduleDocumentIndexing
public void scheduleDocumentIndexing(SearchDocument searchDocument, org.eclipse.core.runtime.IPath container, IndexLocation indexLocation, SearchParticipant searchParticipant) -
toString
- Setzt außer Kraft:
toStringin KlasseJobManager
-
updateParticipant
public void updateParticipant(org.eclipse.core.runtime.IPath indexPath, org.eclipse.core.runtime.IPath containerPath) -
findMatchingIndexNames
-
getMetaIndex
-