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, setIncludeResolutionHeuristics
adapt, getEmptyFilesProvider, getSavedFilesProvider
public 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 InternalFileContentProvider
public void reportPragmaOnceSemantics(java.lang.String filePath, IFileNomination nom)
reportPragmaOnceSemantics
in class InternalFileContentProvider
public IFileNomination isIncludedWithPragmaOnceSemantics(java.lang.String filePath)
isIncludedWithPragmaOnceSemantics
in class InternalFileContentProvider
public boolean getInclusionExists(java.lang.String path)
InternalFileContentProvider
getInclusionExists
in class InternalFileContentProvider
public InternalFileContent getContentForInclusion(java.lang.String path, IMacroDictionary macroDictionary)
InternalFileContentProvider
getContentForInclusion
in class InternalFileContentProvider
path
- the absolute location of the file.macroDictionary
- macros defined at the inclusion point.null
if the location does not exist.InternalFileContent
public java.util.List<java.lang.String> toPathList(java.util.Collection<IIndexFileLocation> newPragmaOnce)
public IIndexFile selectIndexFile(IMacroDictionary macroDictionary, IIndexFileLocation ifl) throws CoreException
CoreException
public InternalFileContent getContentForInclusion(IIndexFileLocation ifl, java.lang.String astPath)
InternalFileContentProvider
getContentForInclusion
in class InternalFileContentProvider
public InternalFileContent getContentForContextToHeaderGap(java.lang.String path, IMacroDictionary macroDictionary) throws InternalFileContentProvider.DependsOnOutdatedFileException
InternalFileContentProvider
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.getContentForContextToHeaderGap
in class InternalFileContentProvider
path
- the absolute location of the file.macroDictionary
- macros defined at the inclusion point.InternalFileContentProvider.DependsOnOutdatedFileException
public IIndexFile[] findIndexFiles(InternalFileContent fc) throws CoreException
CoreException
public java.lang.String getContextPath()
InternalFileContentProvider
null
, if there is no context.getContextPath
in class InternalFileContentProvider
public void setHeadersToIndexAllVersions(java.util.Set<java.lang.String> headers)
public void setIndexAllHeaderVersions(boolean indexAllHeaderVersions)
public boolean shouldIndexAllHeaderVersions(java.lang.String fileName)
InternalFileContentProvider
shouldIndexAllHeaderVersions
in class InternalFileContentProvider