Package org.eclipse.cdt.core.index
Interface IIndexInclude
public interface IIndexInclude
Interface for an include directive stored in the index.
- 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 TypeMethodDescriptionReturns the name of the include.Returns the file that contains this directive.Returns the IIndexFileLocation of the file that contains this directive.Returns the IIndexFileLocation of the file that is included by this directive.getName()
Returns the simple name of the directive.int
Returns the length of the name of the include.int
Returns the character offset of the name of the include in its source file.boolean
isActive()
Test whether this include is in active code (not skipped by conditional preprocessing).boolean
Returnstrue
if the included file is exported by the including header.boolean
Test whether this include has been resolved (found in the file system).boolean
Tests whether this include has been resolved using a heuristics rather than relying on the include search path.boolean
Returns whether this is a system include (an include specified within angle brackets).
-
Field Details
-
EMPTY_INCLUDES_ARRAY
-
-
Method Details
-
getIncludedBy
Returns the file that contains this directive.- Returns:
- the file performing the include
- Throws:
org.eclipse.core.runtime.CoreException
-
getIncludedByLocation
Returns the IIndexFileLocation of the file that contains this directive.- Returns:
- the IIndexFileLocation of the file performing the include
- Throws:
org.eclipse.core.runtime.CoreException
-
getIncludesLocation
Returns the IIndexFileLocation of the file that is included by this directive. In case of an unresolved includenull
will be returned.- Returns:
- the IIndexFileLocation of the file that is included by this directive or
null
if the include is unresolved or inactive - Throws:
org.eclipse.core.runtime.CoreException
-
getName
Returns the simple name of the directive. This skips any leading directories. E.g. for<sys/types.h>
"types.h"
will be returned.- Throws:
org.eclipse.core.runtime.CoreException
-
getFullName
Returns the name of the include. The name does not include the enclosing quotes or angle brackets. E.g. for<sys/types.h>
"sys/types.h"
will be returned.- Throws:
org.eclipse.core.runtime.CoreException
- Since:
- 5.1
-
getNameOffset
int getNameOffset() throws org.eclipse.core.runtime.CoreExceptionReturns the character offset of the name of the include in its source file. The name does not include the enclosing quotes or angle brackets.- Throws:
org.eclipse.core.runtime.CoreException
-
getNameLength
int getNameLength() throws org.eclipse.core.runtime.CoreExceptionReturns the length of the name of the include. The name does not include the enclosing quotes or angle brackets.- Throws:
org.eclipse.core.runtime.CoreException
-
isSystemInclude
boolean isSystemInclude() throws org.eclipse.core.runtime.CoreExceptionReturns whether this is a system include (an include specified within angle brackets).- Throws:
org.eclipse.core.runtime.CoreException
-
isActive
boolean isActive() throws org.eclipse.core.runtime.CoreExceptionTest whether this include is in active code (not skipped by conditional preprocessing).- Returns:
- whether this include is in active code
- Throws:
org.eclipse.core.runtime.CoreException
-
isResolved
boolean isResolved() throws org.eclipse.core.runtime.CoreExceptionTest whether this include has been resolved (found in the file system). Inactive includes are not resolved, unless they constitute a hidden dependency. This is the case when an include is inactive because it has been included before:#ifndef _header_h #include "header.h" #endif
- Returns:
- whether this is a resolved include
- Throws:
org.eclipse.core.runtime.CoreException
-
isResolvedByHeuristics
boolean isResolvedByHeuristics() throws org.eclipse.core.runtime.CoreExceptionTests whether this include has been resolved using a heuristics rather than relying on the include search path.- Throws:
org.eclipse.core.runtime.CoreException
- Since:
- 5.1
-
isIncludedFileExported
boolean isIncludedFileExported() throws org.eclipse.core.runtime.CoreExceptionReturnstrue
if the included file is exported by the including header.- Throws:
org.eclipse.core.runtime.CoreException
- Since:
- 5.5
- See Also:
-
- "https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUPragmas.md"
-