Class SourceFilePage

  • All Implemented Interfaces:
    ILinkable, ITableItem

    public class SourceFilePage
    extends NodePage<ISourceNode>
    Page showing the content of a source file with numbered and highlighted source lines.
    • Field Detail

      • sourceReader

        private final java.io.Reader sourceReader
      • tabWidth

        private final int tabWidth
    • Constructor Detail

      • SourceFilePage

        public SourceFilePage​(ISourceNode sourceFileNode,
                              java.io.Reader sourceReader,
                              int tabWidth,
                              ReportPage parent,
                              ReportOutputFolder folder,
                              IHTMLReportContext context)
        Creates a new page with given information.
        Parameters:
        sourceFileNode - coverage data for this source file
        sourceReader - reader for the source code
        tabWidth - number of character per tab
        parent - optional hierarchical parent
        folder - base folder for this page
        context - settings context
    • Method Detail

      • content

        protected void content​(HTMLElement body)
                        throws java.io.IOException
        Description copied from class: ReportPage
        Creates the actual content of the page.
        Specified by:
        content in class ReportPage
        Parameters:
        body - body tag of the page
        Throws:
        java.io.IOException - in case of IO problems with the report writer
      • head

        protected void head​(HTMLElement head)
                     throws java.io.IOException
        Description copied from class: ReportPage
        Creates the elements within the head element.
        Overrides:
        head in class ReportPage
        Parameters:
        head - head tag of the page
        Throws:
        java.io.IOException - in case of IO problems with the report writer
      • getOnload

        protected java.lang.String getOnload()
        Description copied from class: ReportPage
        Returns the onload handler for this page.
        Overrides:
        getOnload in class ReportPage
        Returns:
        handler or null
      • getFileName

        protected java.lang.String getFileName()
        Description copied from class: ReportPage
        Specifies the local file name of this page.
        Specified by:
        getFileName in class ReportPage
        Returns:
        local file name