public abstract class FileBasedIndexExtension<K,V> extends IndexExtension<K,V,FileContent>
V class MUST have equals / hashcode properly defined!!!
| Modifier and Type | Field and Description |
|---|---|
static ExtensionPointName<FileBasedIndexExtension<?,?>> |
EXTENSION_POINT_NAME |
| Constructor and Description |
|---|
FileBasedIndexExtension() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
dependsOnFileContent() |
int |
getCacheSize() |
java.util.Collection<FileType> |
getFileTypesWithSizeLimitNotApplicable()
For most indices the method should return an empty collection.
|
abstract FileBasedIndex.InputFilter |
getInputFilter() |
abstract ID<K,V> |
getName() |
boolean |
hasSnapshotMapping() |
boolean |
indexDirectories() |
boolean |
keyIsUniqueForIndexedFile() |
boolean |
needsForwardIndexWhenSharing()
Whether this index needs the forward mapping to be shared along with inverted index.
|
boolean |
traceKeyHashToVirtualFileMapping() |
getIndexer, getKeyDescriptor, getValueExternalizer, getVersionpublic static final ExtensionPointName<FileBasedIndexExtension<?,?>> EXTENSION_POINT_NAME
public abstract ID<K,V> getName()
getName in class IndexExtension<K,V,FileContent>public abstract FileBasedIndex.InputFilter getInputFilter()
IndexExtension.getIndexer().
Usually DefaultFileTypeSpecificInputFilter can be used here to index only files with given file-type.
Note that check only file's extension is usually error-prone way and prefer to check VirtualFile.getFileType():
for example user can enforce language file as plain text one.public abstract boolean dependsOnFileContent()
public boolean indexDirectories()
public int getCacheSize()
DEFAULT_CACHE_SIZEpublic java.util.Collection<FileType> getFileTypesWithSizeLimitNotApplicable()
PersistentFSConstants.getMaxIntellisenseFileSize().
Use carefully, because indexing large files may influence index update speed dramatically.
public boolean keyIsUniqueForIndexedFile()
public boolean traceKeyHashToVirtualFileMapping()
public boolean hasSnapshotMapping()
public boolean needsForwardIndexWhenSharing()
false, it is an error to call FileBasedIndex.getFileData(ID, VirtualFile, Project)
for this index.