|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.aspectj.org.eclipse.jdt.internal.core.search.processing.JobManager
org.aspectj.org.eclipse.jdt.internal.core.search.indexing.IndexManager
public class IndexManager
| Field Summary | |
|---|---|
static boolean |
DEBUG
|
SimpleLookupTable |
indexLocations
|
static java.lang.Integer |
REBUILDING_STATE
|
static java.lang.Integer |
SAVED_STATE
|
static java.lang.Integer |
UNKNOWN_STATE
|
static java.lang.Integer |
UPDATING_STATE
|
| Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.search.processing.JobManager |
|---|
activated, awaitingJobs, executing, jobEnd, jobStart, processingThread, progressJob, VERBOSE |
| Fields inherited from interface 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, METHOD_DECL, METHOD_PATTERN, METHOD_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 |
| Constructor Summary | |
|---|---|
IndexManager()
|
|
| Method Summary | |
|---|---|
void |
aboutToUpdateIndex(IPath containerPath,
java.lang.Integer newIndexState)
|
void |
addBinary(IFile resource,
IPath containerPath)
Trigger addition of a resource to an index Note: the actual operation is performed in background |
void |
addSource(IFile resource,
IPath containerPath,
SourceElementParser parser)
Trigger addition of a resource to an index Note: the actual operation is performed in background |
void |
cleanUpIndexes()
|
IPath |
computeIndexLocation(IPath containerPath)
|
void |
deleteIndexFiles()
|
void |
ensureIndexExists(IPath indexLocation,
IPath containerPath)
|
Index |
getIndex(IPath indexLocation)
Returns the index for a given index location |
Index |
getIndex(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) |
Index |
getIndex(IPath containerPath,
IPath 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(IPath[] locations,
IProgressMonitor progressMonitor)
Returns all the existing indexes for a list of index locations. |
Index |
getIndexForUpdate(IPath containerPath,
boolean reuseExistingFile,
boolean createIfMissing)
|
SourceElementParser |
getSourceElementParser(IJavaProject project,
ISourceElementRequestor requestor)
|
void |
indexAll(IProject project)
Trigger addition of the entire content of a project Note: the actual operation is performed in background |
void |
indexDocument(SearchDocument searchDocument,
SearchParticipant searchParticipant,
Index index,
IPath indexLocation)
|
void |
indexLibrary(IPath path,
IProject requestingProject)
Trigger addition of a library to an index Note: the actual operation is performed in background |
void |
indexSourceFolder(JavaProject javaProject,
IPath sourceFolder,
char[][] inclusionPatterns,
char[][] exclusionPatterns)
Index the content of the given source folder. |
void |
jobWasCancelled(IPath containerPath)
|
protected void |
moveToNextJob()
Advance to the next available job, once the current one has been completed. |
protected void |
notifyIdle(long idlingTime)
No more job awaiting. |
java.lang.String |
processName()
Name of the background process |
Index |
recreateIndex(IPath containerPath)
Recreates the index for a given path, keeping the same read-write monitor. |
void |
remove(java.lang.String containerRelativePath,
IPath indexedContainer)
Trigger removal of a resource to an index Note: the actual operation is performed in background |
void |
removeIndex(IPath containerPath)
Removes the index for a given path. |
void |
removeIndexFamily(IPath path)
Removes all indexes whose paths start with (or are equal to) the given path. |
void |
removeIndexPath(IPath path)
Removes all indexes whose paths start with (or are equal to) the given path. |
void |
removeSourceFolderFromIndex(JavaProject javaProject,
IPath sourceFolder,
char[][] inclusionPatterns,
char[][] exclusionPatterns)
Remove the content of the given source folder from the index. |
void |
reset()
Flush current state |
boolean |
resetIndex(IPath containerPath)
Resets the index for a given path. |
void |
saveIndex(Index index)
|
void |
saveIndexes()
Commit all index memory changes to disk |
void |
scheduleDocumentIndexing(SearchDocument searchDocument,
IPath container,
IPath indexLocation,
SearchParticipant searchParticipant)
|
java.lang.String |
toString()
|
void |
updateParticipant(IPath indexLocation,
IPath containerPath)
|
| Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.search.processing.JobManager |
|---|
activateProcessing, awaitingJobsCount, currentJob, disable, discardJobs, enable, isJobWaiting, performConcurrentJob, request, run, shutdown |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public SimpleLookupTable indexLocations
public static final java.lang.Integer SAVED_STATE
public static final java.lang.Integer UPDATING_STATE
public static final java.lang.Integer UNKNOWN_STATE
public static final java.lang.Integer REBUILDING_STATE
public static boolean DEBUG
| Constructor Detail |
|---|
public IndexManager()
| Method Detail |
|---|
public void aboutToUpdateIndex(IPath containerPath,
java.lang.Integer newIndexState)
public void addBinary(IFile resource,
IPath containerPath)
public void addSource(IFile resource,
IPath containerPath,
SourceElementParser parser)
public void cleanUpIndexes()
public IPath computeIndexLocation(IPath containerPath)
public void deleteIndexFiles()
public void ensureIndexExists(IPath indexLocation,
IPath containerPath)
public SourceElementParser getSourceElementParser(IJavaProject project,
ISourceElementRequestor requestor)
public Index getIndex(IPath indexLocation)
indexLocation - The path of the index file
null if not found
public Index getIndex(IPath containerPath,
boolean reuseExistingFile,
boolean createIfMissing)
public Index getIndex(IPath containerPath,
IPath indexLocation,
boolean reuseExistingFile,
boolean createIfMissing)
public Index[] getIndexes(IPath[] locations,
IProgressMonitor progressMonitor)
locations - The list of of the index files path
public Index getIndexForUpdate(IPath containerPath,
boolean reuseExistingFile,
boolean createIfMissing)
public void indexDocument(SearchDocument searchDocument,
SearchParticipant searchParticipant,
Index index,
IPath indexLocation)
public void indexAll(IProject project)
public void indexLibrary(IPath path,
IProject requestingProject)
public void indexSourceFolder(JavaProject javaProject,
IPath sourceFolder,
char[][] inclusionPatterns,
char[][] exclusionPatterns)
public void jobWasCancelled(IPath containerPath)
protected void moveToNextJob()
moveToNextJob in class JobManagerprotected void notifyIdle(long idlingTime)
notifyIdle in class JobManagerpublic java.lang.String processName()
processName in class JobManagerpublic Index recreateIndex(IPath containerPath)
public void remove(java.lang.String containerRelativePath,
IPath indexedContainer)
public void removeIndex(IPath containerPath)
public void removeIndexPath(IPath path)
public void removeIndexFamily(IPath path)
public void removeSourceFolderFromIndex(JavaProject javaProject,
IPath sourceFolder,
char[][] inclusionPatterns,
char[][] exclusionPatterns)
public void reset()
reset in class JobManagerpublic boolean resetIndex(IPath containerPath)
public void saveIndex(Index index)
throws java.io.IOException
java.io.IOExceptionpublic void saveIndexes()
public void scheduleDocumentIndexing(SearchDocument searchDocument,
IPath container,
IPath indexLocation,
SearchParticipant searchParticipant)
public java.lang.String toString()
toString in class JobManager
public void updateParticipant(IPath indexLocation,
IPath containerPath)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||