Eclipse CDT
7.0

org.eclipse.cdt.core.dom.ast
Interface IASTFileLocation

All Superinterfaces:
IASTNodeLocation
All Known Subinterfaces:
IASTImageLocation

public interface IASTFileLocation
extends IASTNodeLocation

Represents a node location that is directly in the source file.


Field Summary
 
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTNodeLocation
EMPTY_ARRAY
 
Method Summary
 IASTPreprocessorIncludeStatement getContextInclusionStatement()
          Returns the inclusion statement that included this file, or null for a top-level file.
 int getEndingLineNumber()
          Returns the ending line number.
 java.lang.String getFileName()
          The name of the file.
 int getNodeLength()
          Returns the length of this location in terms of characters.
 int getNodeOffset()
          Returns the offset within the file where this location starts.
 int getStartingLineNumber()
          Returns the starting line number.
 
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTNodeLocation
asFileLocation
 

Method Detail

getFileName

java.lang.String getFileName()
The name of the file.

Returns:
the name of the file

getNodeOffset

int getNodeOffset()
Returns the offset within the file where this location starts.

Specified by:
getNodeOffset in interface IASTNodeLocation

getNodeLength

int getNodeLength()
Returns the length of this location in terms of characters.

Specified by:
getNodeLength in interface IASTNodeLocation

getStartingLineNumber

int getStartingLineNumber()
Returns the starting line number. Locations obtained via the index do not have line numbers and return 0.

Returns:
the 1-based line number, or 0 if not applicable

getEndingLineNumber

int getEndingLineNumber()
Returns the ending line number. Locations obtained via the index do not have line numbers and return 0.

Returns:
the 1-based line number, or 0 if not applicable

getContextInclusionStatement

IASTPreprocessorIncludeStatement getContextInclusionStatement()
Returns the inclusion statement that included this file, or null for a top-level file. Also null when the file location does not belong to an AST node, e.g. if it is obtained from a name in the index.

Since:
5.4

Eclipse CDT
7.0

Copyright (c) IBM Corp. and others 2004, 2012. All Rights Reserved.