public final class FileTypeIndexImpl extends ScalarIndexExtension<FileType> implements CustomImplementationFileBasedIndexExtension<FileType,java.lang.Void>
VOID_DATA_EXTERNALIZER
EXTENSION_POINT_NAME
Constructor and Description |
---|
FileTypeIndexImpl() |
Modifier and Type | Method and Description |
---|---|
UpdatableIndex<FileType,java.lang.Void,FileContent> |
createIndexImplementation(FileBasedIndexExtension<FileType,java.lang.Void> extension,
IndexStorage<FileType,java.lang.Void> storage) |
boolean |
dependsOnFileContent() |
DataIndexer<FileType,java.lang.Void,FileContent> |
getIndexer() |
FileBasedIndex.InputFilter |
getInputFilter() |
KeyDescriptor<FileType> |
getKeyDescriptor() |
ID<FileType,java.lang.Void> |
getName() |
int |
getVersion() |
getValueExternalizer
getCacheSize, getFileTypesWithSizeLimitNotApplicable, hasSnapshotMapping, indexDirectories, keyIsUniqueForIndexedFile, needsForwardIndexWhenSharing, traceKeyHashToVirtualFileMapping
public ID<FileType,java.lang.Void> getName()
getName
in class FileBasedIndexExtension<FileType,java.lang.Void>
public DataIndexer<FileType,java.lang.Void,FileContent> getIndexer()
getIndexer
in class IndexExtension<FileType,java.lang.Void,FileContent>
public KeyDescriptor<FileType> getKeyDescriptor()
getKeyDescriptor
in class IndexExtension<FileType,java.lang.Void,FileContent>
public FileBasedIndex.InputFilter getInputFilter()
getInputFilter
in class FileBasedIndexExtension<FileType,java.lang.Void>
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 boolean dependsOnFileContent()
dependsOnFileContent
in class FileBasedIndexExtension<FileType,java.lang.Void>
public int getVersion()
getVersion
in class IndexExtension<FileType,java.lang.Void,FileContent>
public UpdatableIndex<FileType,java.lang.Void,FileContent> createIndexImplementation(FileBasedIndexExtension<FileType,java.lang.Void> extension, IndexStorage<FileType,java.lang.Void> storage) throws StorageException, java.io.IOException
createIndexImplementation
in interface CustomImplementationFileBasedIndexExtension<FileType,java.lang.Void>
StorageException
java.io.IOException