public final class FileBasedIndexImpl extends FileBasedIndexEx
FileBasedIndex.FileTypeSpecificInputFilter, FileBasedIndex.InputFilter, FileBasedIndex.ValueProcessor<V>
Modifier and Type | Field and Description |
---|---|
static boolean |
DO_TRACE_STUB_INDEX_UPDATE |
ourEnableTracingOfKeyHashToVirtualFileMapping, ourSnapshotMappingsEnabled
Constructor and Description |
---|
FileBasedIndexImpl() |
ensureUpToDate, getAllKeys, getContainingFiles, getFileData, getFilesWithKey, getIndexModificationStamp, getOrderedIndexableFilesProviders, getValues, iterateIndexableFiles, processAllKeys, processAllKeys, processFilesContainingAllKeys, processValues, processValues, scheduleRebuild
getFileId, getInstance, isIndexAccessDuringDumbModeEnabled, iterateRecursively, requestRebuild
public static boolean isProjectOrWorkspaceFile(VirtualFile file, FileType fileType)
public void requestReindex(VirtualFile file)
requestReindex
in class FileBasedIndex
public static <T,E extends java.lang.Throwable> T disableUpToDateCheckIn(ThrowableComputable<T,E> runnable) throws E extends java.lang.Throwable
E extends java.lang.Throwable
public void ignoreDumbMode(java.lang.Runnable command, Project project, DumbModeAccessType dumbModeAccessType)
FileBasedIndex
IndexNotReadyException
are not expected to be happen here.
In smart mode, the behavior is similar to direct command execution
ignoreDumbMode
in class FileBasedIndex
command
- - a command to executeproject
- - project where dumb mode will be ignoreddumbModeAccessType
- - defines in which manner command should be executed. Does a client expect only reliable data
or any data from index is fine (even outdated and not yet updated)?public <K> boolean ensureUpToDate(ID<K,?> indexId, Project project, GlobalSearchScope filter, VirtualFile restrictedFile)
ensureUpToDate
in class FileBasedIndexEx
public void cleanupForNextTest()
public ChangedFilesCollector getChangedFilesCollector()
public ProjectIndexableFilesFilter projectIndexableFiles(Project project)
projectIndexableFiles
in class FileBasedIndexEx
public static java.lang.Throwable getCauseToRebuildIndex(java.lang.RuntimeException e)
public void runCleanupAction(java.lang.Runnable cleanupAction)
public void requestRebuild(ID<?,?> indexId, java.lang.Throwable throwable)
requestRebuild
in class FileBasedIndex
public <K,V> UpdatableIndex<K,V,FileContent> getIndex(ID<K,V> indexId)
public boolean isFileUpToDate(VirtualFile file)
public void indexFiles(Project project, java.util.Collection<VirtualFile> files, ProgressIndicator indicator)
public boolean isIndexingCandidate(VirtualFile file, ID<?,?> indexId)
public VirtualFile getFileBeingCurrentlyIndexed()
getFileBeingCurrentlyIndexed
in class FileBasedIndex
null
if current thread isn't indexing.public DumbModeAccessType getCurrentDumbModeAccessType()
getCurrentDumbModeAccessType
in class FileBasedIndex
public void dropNontrivialIndexedStates(int inputId)
public void registerIndexableSet(IndexableFileSet set, Project project)
registerIndexableSet
in class FileBasedIndex
public void removeIndexableSet(IndexableFileSet set)
removeIndexableSet
in class FileBasedIndex
public VirtualFile findFileById(Project project, int id)
findFileById
in class FileBasedIndex
public static void cleanupProcessedFlag()
public void invalidateCaches()
invalidateCaches
in class FileBasedIndex
public java.util.function.IntPredicate getAccessibleFileIdFilter(Project project)
getAccessibleFileIdFilter
in class FileBasedIndexEx
public void flushIndexes()
public static boolean isPsiDependentIndex(IndexExtension<?,?,?> extension)