public interface ISourceReference
Note: For IBinary
, IArchive
and other members
derived from a binary type, the implementation returns source iff the element
has attached source code and debugging information.
Modifier and Type | Method and Description |
---|---|
int |
getIndex()
Allows to differentiate otherwise equal elements of the same file.
|
String |
getSource()
Returns the source code associated with this element.
|
ISourceRange |
getSourceRange()
Returns the source range associated with this element.
|
ITranslationUnit |
getTranslationUnit()
Returns the translation unit in which this member is declared, or
null
if this member is not declared in a translation unit (for example, a binary type). |
boolean |
isActive()
Returns whether this element is in active code.
|
String getSource() throws CModelException
For binary files, this returns the source of the entire translation unit associated with the binary file (if there is one).
null
if this element has no
associated source codeCModelException
- if this element does not exist or if an
exception occurs while accessing its corresponding resourceISourceRange getSourceRange() throws CModelException
For binary files, this returns the range of the entire translation unit associated with the binary file (if there is one).
null
if if this element has no
associated source codeCModelException
- if this element does not exist or if an
exception occurs while accessing its corresponding resourceITranslationUnit getTranslationUnit()
null
if this member is not declared in a translation unit (for example, a binary type).boolean isActive()
int getIndex()
Copyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.