public class ProjectIndexerInputAdapter extends IndexerInputAdapter
Constructor and Description |
---|
ProjectIndexerInputAdapter(ICProject cproject) |
ProjectIndexerInputAdapter(ICProject cproject,
boolean useCache) |
Modifier and Type | Method and Description |
---|---|
boolean |
canBePartOfSDK(IIndexFileLocation ifl)
Tests whether the file in the index is allowed to be part of an SDK.
|
boolean |
doesIncludeFileExist(java.lang.String includePath)
Check for existence of an inclusion as computed by the preprocessor.
|
java.lang.String |
getASTPath(IIndexFileLocation ifl)
Convert an index file location to the path as it will be stored in the AST.
|
IScannerInfo |
getBuildConfiguration(int linkageID,
java.lang.Object tu)
Obtains the scanner configuration for the input file.
|
FileContent |
getCodeReader(java.lang.Object tuo)
Returns a code reader for the given input file.
|
java.lang.String |
getEncoding(IIndexFileLocation ifl)
Returns the encoding for the file.
|
long |
getFileSize(IIndexFileLocation ifl)
Returns the size of the file in bytes, or 0 if the file does not exist.
|
long |
getFileSize(java.lang.String astFilePath)
Returns the size of the file in bytes, or -1 if it cannot be determined
|
int |
getIndexingPriority(IIndexFileLocation ifl)
Returns the priority of indexing a file.
|
java.lang.Object |
getInputFile(IIndexFileLocation location)
Returns an object representing an input file for the given index location,
or
null , if it does not exist. |
AbstractLanguage[] |
getLanguages(java.lang.Object tuo,
AbstractIndexerTask.UnusedHeaderStrategy strategy)
Obtains the languages the input file should be parsed with.
|
long |
getLastModified(IIndexFileLocation ifl)
Return the last modification date for the file denoted by the index location.
|
boolean |
isCaseInsensitiveFileSystem()
Returns whether the file-system is case insensitive.
|
boolean |
isFileBuildConfigured(java.lang.Object tuo)
Tests whether the input file is part of the build.
|
boolean |
isIndexedOnlyIfIncluded(java.lang.Object tu)
Returns whether the given translation unit is not indexed unless it gets included.
|
boolean |
isIndexedUnconditionally(IIndexFileLocation ifl)
Checks whether the given file should be indexed unconditionally.
|
boolean |
isSource(java.lang.String filename)
Answers whether this file is considered to be a source file (vs.
|
boolean |
isSourceUnit(java.lang.Object tuo)
Tests whether the input file is a source unit.
|
IIndexFileLocation |
resolveASTPath(java.lang.String astPath)
Resolve a path as stored in the AST.
|
IIndexFileLocation |
resolveFile(java.lang.Object tuo)
Create an index location for the given input file.
|
IIndexFileLocation |
resolveIncludeFile(java.lang.String includePath)
Resolve a path for an inclusion as computed by the preprocessor.
|
public ProjectIndexerInputAdapter(ICProject cproject)
public ProjectIndexerInputAdapter(ICProject cproject, boolean useCache)
public boolean isCaseInsensitiveFileSystem()
ASTFilePathResolver
isCaseInsensitiveFileSystem
in class ASTFilePathResolver
public IIndexFileLocation resolveASTPath(java.lang.String astPath)
ASTFilePathResolver
resolveASTPath
in class ASTFilePathResolver
public IIndexFileLocation resolveIncludeFile(java.lang.String includePath)
ASTFilePathResolver
null
if the file does not exist.resolveIncludeFile
in class ASTFilePathResolver
null
if the file does not exist.public boolean doesIncludeFileExist(java.lang.String includePath)
ASTFilePathResolver
doesIncludeFileExist
in class ASTFilePathResolver
public long getFileSize(java.lang.String astFilePath)
ASTFilePathResolver
getFileSize
in class ASTFilePathResolver
public java.lang.String getASTPath(IIndexFileLocation ifl)
ASTFilePathResolver
getASTPath
in class ASTFilePathResolver
public IScannerInfo getBuildConfiguration(int linkageID, java.lang.Object tu)
IndexerInputAdapter
getBuildConfiguration
in class IndexerInputAdapter
public long getLastModified(IIndexFileLocation ifl)
IndexerInputAdapter
getLastModified
in class IndexerInputAdapter
public long getFileSize(IIndexFileLocation ifl)
IndexerInputAdapter
getFileSize
in class IndexerInputAdapter
public java.lang.String getEncoding(IIndexFileLocation ifl)
IndexerInputAdapter
getEncoding
in class IndexerInputAdapter
public AbstractLanguage[] getLanguages(java.lang.Object tuo, AbstractIndexerTask.UnusedHeaderStrategy strategy)
IndexerInputAdapter
getLanguages
in class IndexerInputAdapter
public boolean isFileBuildConfigured(java.lang.Object tuo)
IndexerInputAdapter
isFileBuildConfigured
in class IndexerInputAdapter
public boolean isIndexedOnlyIfIncluded(java.lang.Object tu)
IndexerInputAdapter
isIndexedOnlyIfIncluded
in class IndexerInputAdapter
public boolean isIndexedUnconditionally(IIndexFileLocation ifl)
IndexerInputAdapter
isIndexedUnconditionally
in class IndexerInputAdapter
ifl
- the location of the filetrue
if the file should be indexed unconditionallypublic int getIndexingPriority(IIndexFileLocation ifl)
IndexerInputAdapter
getIndexingPriority
in class IndexerInputAdapter
ifl
- the location of the filetrue
the indexing prioritypublic boolean isSourceUnit(java.lang.Object tuo)
IndexerInputAdapter
isSourceUnit
in class IndexerInputAdapter
public boolean isSource(java.lang.String filename)
ASTFilePathResolver
isSource
in class ASTFilePathResolver
public IIndexFileLocation resolveFile(java.lang.Object tuo)
IndexerInputAdapter
resolveFile
in class IndexerInputAdapter
public boolean canBePartOfSDK(IIndexFileLocation ifl)
IndexerInputAdapter
canBePartOfSDK
in class IndexerInputAdapter
public java.lang.Object getInputFile(IIndexFileLocation location)
IndexerInputAdapter
null
, if it does not exist.getInputFile
in class IndexerInputAdapter
public FileContent getCodeReader(java.lang.Object tuo)
IndexerInputAdapter
getCodeReader
in class IndexerInputAdapter