public final class IndexBasedFileContentProvider extends InternalFileContentProvider
InternalFileContentProvider.DependsOnOutdatedFileException| Constructor and Description |
|---|
IndexBasedFileContentProvider(IIndex index,
ASTFilePathResolver pathResolver,
int linkage,
IncludeFileContentProvider fallbackFactory) |
IndexBasedFileContentProvider(IIndex index,
ASTFilePathResolver pathResolver,
int linkage,
IncludeFileContentProvider fallbackFactory,
AbstractIndexerTask relatedIndexerTask) |
| Modifier and Type | Method and Description |
|---|---|
IIndexFile[] |
findIndexFiles(InternalFileContent fc) |
InternalFileContent |
getContentForContextToHeaderGap(java.lang.String path,
IMacroDictionary macroDictionary)
Returns a file-content object of kind
InternalFileContent.InclusionKind.FOUND_IN_INDEX, representing
the content from the context of the given file up to where the file actually gets included,
or null if this cannot be done. |
InternalFileContent |
getContentForInclusion(IIndexFileLocation ifl,
java.lang.String astPath)
Called only when used as a delegate of the index file content provider.
|
InternalFileContent |
getContentForInclusion(java.lang.String path,
IMacroDictionary macroDictionary)
Creates an InclusionContent object for the given location.
|
java.lang.String |
getContextPath()
Returns the path of the context of
null, if there is no context. |
boolean |
getInclusionExists(java.lang.String path)
Checks whether the specified inclusion exists.
|
IFileNomination |
isIncludedWithPragmaOnceSemantics(java.lang.String filePath)
Returns whether the given file has been included with pragma once semantics.
|
void |
reportPragmaOnceSemantics(java.lang.String filePath,
IFileNomination nom)
Reports detection of pragma once semantics.
|
void |
resetForTranslationUnit() |
IIndexFile |
selectIndexFile(IMacroDictionary macroDictionary,
IIndexFileLocation ifl) |
void |
setContextToHeaderGap(IIndexFile[] ctxToHeader) |
void |
setFileSizeLimit(long limit) |
void |
setHeadersToIndexAllVersions(java.util.Set<java.lang.String> headers) |
void |
setIndexAllHeaderVersions(boolean indexAllHeaderVersions) |
void |
setLinkage(int linkageID) |
boolean |
shouldIndexAllHeaderVersions(java.lang.String fileName)
Returns whether or not the header file should be indexed for all versions
|
java.util.List<java.lang.String> |
toPathList(java.util.Collection<IIndexFileLocation> newPragmaOnce) |
addLoadedVersions, getIncludeHeuristics, getLoadedVersions, setIncludeResolutionHeuristicsadapt, getEmptyFilesProvider, getSavedFilesProviderpublic IndexBasedFileContentProvider(IIndex index, ASTFilePathResolver pathResolver, int linkage, IncludeFileContentProvider fallbackFactory)
public IndexBasedFileContentProvider(IIndex index, ASTFilePathResolver pathResolver, int linkage, IncludeFileContentProvider fallbackFactory, AbstractIndexerTask relatedIndexerTask)
public void setContextToHeaderGap(IIndexFile[] ctxToHeader)
public void setFileSizeLimit(long limit)
public void setLinkage(int linkageID)
public void resetForTranslationUnit()
resetForTranslationUnit in class InternalFileContentProviderpublic void reportPragmaOnceSemantics(java.lang.String filePath,
IFileNomination nom)
reportPragmaOnceSemantics in class InternalFileContentProviderpublic IFileNomination isIncludedWithPragmaOnceSemantics(java.lang.String filePath)
isIncludedWithPragmaOnceSemantics in class InternalFileContentProviderpublic boolean getInclusionExists(java.lang.String path)
InternalFileContentProvidergetInclusionExists in class InternalFileContentProviderpublic InternalFileContent getContentForInclusion(java.lang.String path, IMacroDictionary macroDictionary)
InternalFileContentProvidergetContentForInclusion in class InternalFileContentProviderpath - the absolute location of the file.macroDictionary - macros defined at the inclusion point.null if the location does not exist.InternalFileContentpublic java.util.List<java.lang.String> toPathList(java.util.Collection<IIndexFileLocation> newPragmaOnce)
public IIndexFile selectIndexFile(IMacroDictionary macroDictionary, IIndexFileLocation ifl) throws CoreException
CoreExceptionpublic InternalFileContent getContentForInclusion(IIndexFileLocation ifl, java.lang.String astPath)
InternalFileContentProvidergetContentForInclusion in class InternalFileContentProviderpublic InternalFileContent getContentForContextToHeaderGap(java.lang.String path, IMacroDictionary macroDictionary) throws InternalFileContentProvider.DependsOnOutdatedFileException
InternalFileContentProviderInternalFileContent.InclusionKind.FOUND_IN_INDEX, representing
the content from the context of the given file up to where the file actually gets included,
or null if this cannot be done.getContentForContextToHeaderGap in class InternalFileContentProviderpath - the absolute location of the file.macroDictionary - macros defined at the inclusion point.InternalFileContentProvider.DependsOnOutdatedFileExceptionpublic IIndexFile[] findIndexFiles(InternalFileContent fc) throws CoreException
CoreExceptionpublic java.lang.String getContextPath()
InternalFileContentProvidernull, if there is no context.getContextPath in class InternalFileContentProviderpublic void setHeadersToIndexAllVersions(java.util.Set<java.lang.String> headers)
public void setIndexAllHeaderVersions(boolean indexAllHeaderVersions)
public boolean shouldIndexAllHeaderVersions(java.lang.String fileName)
InternalFileContentProvidershouldIndexAllHeaderVersions in class InternalFileContentProvider