Package org.eclipse.cdt.core.index
Interface IIndexFile
- All Superinterfaces:
IFileNomination
Represents a file that has been indexed.
- Since:
- 4.0
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindNames
(int offset, int length) Find all names within the given range.long
Hash of the file contents when the file was indexed.int
Deprecated.Returns 0.Returns all includes found in this file.int
Returns the id of the linkage this file was parsed in.Returns an IIndexFileLocation representing the location of this fileReturns all macros defined in this file.Returns the include that was used to parse this file, may benull
.Returns the name of the replacement header obtained from@headername{header}
or fromIWYU pragma: private, include "header"
.int
Deprecated.Returns 0.long
Time when the file was read during indexing.long
Last modification of file before it was indexed.Returns all using directives for namespaces and global scope, found in this file.Returns detailed information about the file.Methods inherited from interface org.eclipse.cdt.core.dom.ast.IFileNomination
getSignificantMacros, hasPragmaOnceSemantics
-
Field Details
-
EMPTY_FILE_ARRAY
-
-
Method Details
-
getLocation
Returns an IIndexFileLocation representing the location of this file- Throws:
org.eclipse.core.runtime.CoreException
-
getIncludes
Returns all includes found in this file.- Returns:
- an array of all includes found in this file
- Throws:
org.eclipse.core.runtime.CoreException
-
getMacros
Returns all macros defined in this file.- Returns:
- an array of macros found in this file
- Throws:
org.eclipse.core.runtime.CoreException
-
getUsingDirectives
Returns all using directives for namespaces and global scope, found in this file.- Throws:
org.eclipse.core.runtime.CoreException
- Since:
- 5.0
-
getTimestamp
long getTimestamp() throws org.eclipse.core.runtime.CoreExceptionLast modification of file before it was indexed.- Returns:
- the last modification date of the file at the time it was parsed.
- Throws:
org.eclipse.core.runtime.CoreException
-
getSourceReadTime
long getSourceReadTime() throws org.eclipse.core.runtime.CoreExceptionTime when the file was read during indexing. Corresponds to the start of reading.- Returns:
- time of indexing in milliseconds since epoch
- Throws:
org.eclipse.core.runtime.CoreException
- Since:
- 5.4
-
getContentsHash
long getContentsHash() throws org.eclipse.core.runtime.CoreExceptionHash of the file contents when the file was indexed.- Returns:
- 64-bit hash of the file content.
- Throws:
org.eclipse.core.runtime.CoreException
- Since:
- 5.2
-
getScannerConfigurationHashcode
Deprecated.Returns 0.- Throws:
org.eclipse.core.runtime.CoreException
- Restriction:
- This method is not intended to be referenced by clients.
-
getEncodingHashcode
Deprecated.Returns 0.- Throws:
org.eclipse.core.runtime.CoreException
- Since:
- 5.3
- Restriction:
- This method is not intended to be referenced by clients.
-
findNames
Find all names within the given range.- Throws:
org.eclipse.core.runtime.CoreException
-
getParsedInContext
Returns the include that was used to parse this file, may benull
.- Throws:
org.eclipse.core.runtime.CoreException
-
getLinkageID
int getLinkageID() throws org.eclipse.core.runtime.CoreExceptionReturns the id of the linkage this file was parsed in.- Throws:
org.eclipse.core.runtime.CoreException
- Since:
- 5.0
-
getReplacementHeader
Returns the name of the replacement header obtained from@headername{header}
or fromIWYU pragma: private, include "header"
. Returns an empty string if the file containedIWYU pragma: private
without a replacement header. Returnsnull
if the file does not contain@headername{header}
orIWYU pragma: private
.- Throws:
org.eclipse.core.runtime.CoreException
- Since:
- 5.7
-
toDebugString
String toDebugString()Returns detailed information about the file. For debugging only.- Since:
- 5.4
-