Interface ISourceReference

    • Method Detail

      • getSource

        String getSource()
                  throws CModelException
        Returns the source code associated with this element.

        For binary files, this returns the source of the entire translation unit associated with the binary file (if there is one).

        Returns:
        the source code, or null if this element has no associated source code
        Throws:
        CModelException - if this element does not exist or if an exception occurs while accessing its corresponding resource
      • getSourceRange

        ISourceRange getSourceRange()
                             throws CModelException
        Returns the source range associated with this element.

        For binary files, this returns the range of the entire translation unit associated with the binary file (if there is one).

        Returns:
        the source range, or null if if this element has no associated source code
        Throws:
        CModelException - if this element does not exist or if an exception occurs while accessing its corresponding resource
      • getTranslationUnit

        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).
      • isActive

        boolean isActive()
        Returns whether this element is in active code. Code is inactive when it is hidden by conditional compilation.
        Since:
        5.1
      • getIndex

        int getIndex()
        Allows to differentiate otherwise equal elements of the same file.
        Since:
        5.1