Package org.eclipse.cdt.core.index
Interface IIndexInclude
-
public interface IIndexIncludeInterface 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
Fields Modifier and Type Field Description static IIndexInclude[]EMPTY_INCLUDES_ARRAY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetFullName()Returns the name of the include.IIndexFilegetIncludedBy()Returns the file that contains this directive.IIndexFileLocationgetIncludedByLocation()Returns the IIndexFileLocation of the file that contains this directive.IIndexFileLocationgetIncludesLocation()Returns the IIndexFileLocation of the file that is included by this directive.StringgetName()Returns the simple name of the directive.intgetNameLength()Returns the length of the name of the include.intgetNameOffset()Returns the character offset of the name of the include in its source file.booleanisActive()Test whether this include is in active code (not skipped by conditional preprocessing).booleanisIncludedFileExported()Returnstrueif the included file is exported by the including header.booleanisResolved()Test whether this include has been resolved (found in the file system).booleanisResolvedByHeuristics()Tests whether this include has been resolved using a heuristics rather than relying on the include search path.booleanisSystemInclude()Returns whether this is a system include (an include specified within angle brackets).
-
-
-
Field Detail
-
EMPTY_INCLUDES_ARRAY
static final IIndexInclude[] EMPTY_INCLUDES_ARRAY
-
-
Method Detail
-
getIncludedBy
IIndexFile getIncludedBy() throws org.eclipse.core.runtime.CoreException
Returns the file that contains this directive.- Returns:
- the file performing the include
- Throws:
org.eclipse.core.runtime.CoreException
-
getIncludedByLocation
IIndexFileLocation getIncludedByLocation() throws org.eclipse.core.runtime.CoreException
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
IIndexFileLocation getIncludesLocation() throws org.eclipse.core.runtime.CoreException
Returns the IIndexFileLocation of the file that is included by this directive. In case of an unresolved includenullwill be returned.- Returns:
- the IIndexFileLocation of the file that is included by this directive or
nullif the include is unresolved or inactive - Throws:
org.eclipse.core.runtime.CoreException
-
getName
String getName() throws org.eclipse.core.runtime.CoreException
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
String getFullName() throws org.eclipse.core.runtime.CoreException
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.CoreExceptionReturnstrueif 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"
-
-