Package org.jacoco.report.internal.html

Examples of org.jacoco.report.internal.html.HTMLElement


   * @throws IOException
   *             problems while reading the source file or writing the output
   */
  public void render(final HTMLElement parent, final ISourceNode source,
      final Reader contents) throws IOException {
    final HTMLElement pre = parent.pre(Styles.SOURCE + " lang-" + lang
        + " linenums");
    final BufferedReader lineBuffer = new BufferedReader(contents);
    String line;
    int nr = 0;
    while ((line = lineBuffer.readLine()) != null) {
View Full Code Here


  }

  private HTMLElement span(final HTMLElement parent, final String id,
      final String style1, final String style2, final String title,
      final ICounter branches) throws IOException {
    final HTMLElement span = parent.span(style1 + " " + style2, id);
    final Integer missed = Integer.valueOf(branches.getMissedCount());
    final Integer total = Integer.valueOf(branches.getTotalCount());
    span.attr("title", String.format(locale, title, missed, total));
    return span;
  }
View Full Code Here

    head.title().text(getLinkLabel());
  }

  private void body(final HTMLElement body) throws IOException {
    body.attr("onload", getOnload());
    final HTMLElement navigation = body.div(Styles.BREADCRUMB);
    navigation.attr("id", "breadcrumb");
    infoLinks(navigation.span(Styles.RIGHT));
    breadcrumb(navigation, folder);
    body.h1().text(getLinkLabel());
    content(body);
    footer(body);
  }
View Full Code Here

      div.text(" > ");
    }
  }

  private void footer(final HTMLElement body) throws IOException {
    final HTMLElement footer = body.div(Styles.FOOTER);
    final HTMLElement versioninfo = footer.span(Styles.RIGHT);
    versioninfo.text("Created with ");
    versioninfo.a(JaCoCo.HOMEURL).text("JaCoCo");
    versioninfo.text(" ").text(JaCoCo.VERSION);
    footer.text(context.getFooterText());
  }
View Full Code Here

      executionDataTable(body);
    }
  }

  private void sessionTable(final HTMLElement body) throws IOException {
    final HTMLElement table = body.table(Styles.COVERAGETABLE);
    {
      final HTMLElement tr = table.thead().tr();
      tr.td().text("Session");
      tr.td().text("Start Time");
      tr.td().text("Dump Time");
    }
    final HTMLElement tbody = table.tbody();
    for (final SessionInfo i : sessionInfos) {
      final HTMLElement tr = tbody.tr();
      tr.td().span(Styles.EL_SESSION).text(i.getId());
      tr.td().text(dateFormat.format(new Date(i.getStartTimeStamp())));
      tr.td().text(dateFormat.format(new Date(i.getDumpTimeStamp())));
    }
  }
View Full Code Here

      tr.td().text(dateFormat.format(new Date(i.getDumpTimeStamp())));
    }
  }

  private void executionDataTable(final HTMLElement body) throws IOException {
    final HTMLElement table = body.table(Styles.COVERAGETABLE);
    {
      final HTMLElement tr = table.thead().tr();
      tr.td().text("Class");
      tr.td().text("Id");
    }
    final HTMLElement tbody = table.tbody();
    final ILanguageNames names = context.getLanguageNames();
    for (final ExecutionData e : executionData) {
      final HTMLElement tr = tbody.tr();
      final String link = index.getLinkToClass(e.getId());
      final String qualifiedName = names.getQualifiedClassName(e
          .getName());
      if (link == null) {
        tr.td().span(Styles.EL_CLASS).text(qualifiedName);
      } else {
        tr.td().a(link, Styles.EL_CLASS).text(qualifiedName);
      }
      final String id = String.format("%016x", Long.valueOf(e.getId()));
      tr.td().code().text(id);
    }
  }
View Full Code Here

   * @throws IOException
   *             problems while reading the source file or writing the output
   */
  public void render(final HTMLElement parent, final ISourceNode source,
      final Reader contents) throws IOException {
    final HTMLElement pre = parent.pre(Styles.SOURCE + " lang-" + lang
        + " linenums");
    final BufferedReader lineBuffer = new BufferedReader(contents);
    String line;
    int nr = 0;
    while ((line = lineBuffer.readLine()) != null) {
View Full Code Here

  }

  private HTMLElement span(final HTMLElement parent, final String id,
      final String style1, final String style2, final String title,
      final ICounter branches) throws IOException {
    final HTMLElement span = parent.span(style1 + " " + style2, id);
    final Integer missed = Integer.valueOf(branches.getMissedCount());
    final Integer total = Integer.valueOf(branches.getTotalCount());
    span.attr("title", String.format(locale, title, missed, total));
    return span;
  }
View Full Code Here

    head.title().text(getLinkLabel());
  }

  private void body(final HTMLElement body) throws IOException {
    body.attr("onload", getOnload());
    final HTMLElement navigation = body.div(Styles.BREADCRUMB);
    navigation.attr("id", "breadcrumb");
    infoLinks(navigation.span(Styles.RIGHT));
    breadcrumb(navigation, folder);
    body.h1().text(getLinkLabel());
    content(body);
    footer(body);
  }
View Full Code Here

      div.text(" > ");
    }
  }

  private void footer(final HTMLElement body) throws IOException {
    final HTMLElement footer = body.div(Styles.FOOTER);
    final HTMLElement versioninfo = footer.span(Styles.RIGHT);
    versioninfo.text("Created with ");
    versioninfo.a(JaCoCo.HOMEURL).text("JaCoCo");
    versioninfo.text(" ").text(JaCoCo.VERSION);
    footer.text(context.getFooterText());
  }
View Full Code Here

TOP

Related Classes of org.jacoco.report.internal.html.HTMLElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.