/** * Render information about the exception (if any) * @param html * @throws IOException */ public void renderStackTraceOn(HtmlCanvas html) throws IOException { // @formatter:off if (null == exception) return; StringWriter sw = new StringWriter(); PrintWriter buffer = new PrintWriter(sw); exception.printStackTrace(buffer); html.pre().write(sw.toString(), true)._pre(); html.hr(); }
private HtmlCanvas generateSample(String title, String sample) throws IOException { HtmlCanvas html = new HtmlCanvas(); this.project.getProperties().put("data-clipboard-text", sample.replace("\n", "
")); this.project.getProperties().put("config-title", title); String templateStart = replaceProperties(replaceProperties("${configTextStart}")); String templateEnd = replaceProperties(replaceProperties("${configTextEnd}")); html.write(templateStart, false); html. pre(class_("xml")). write(sample, false) ._pre(); html.write(templateEnd, false); return html; }
private HtmlCanvas generateSampleProfile(HtmlCanvas html) throws IOException { this.project.getProperties().put("data-clipboard-text", getFullSampleProfile()); this.project.getProperties().put("config-title", "Sample profile for Maven settings.xml"); String templateStart = replaceProperties(replaceProperties("${configTextStart}")); String templateEnd = replaceProperties(replaceProperties("${configTextEnd}")); html.write(templateStart, false); html. pre(class_("xml")). write("<profile>\n"). write(" <id>" + project.getArtifactId() + "</id>\n"). write(" <properties>\n"); for (GlobalParameter globalParameter : globalParameters) { if (!globalParameter.valueGuessedByDefault) { html.write(" <" + globalParameter.property + ">[...]</" + globalParameter.property + ">\n"); } } html. write(" </properties>\n"). write("</profile>") ._pre(); html.write(templateEnd, false); return html; }
@Override public void renderOn(HtmlCanvas html) throws IOException { html .render(DocType.HTML5) .html(lang("en")) .render(new BootstrapHeaderView()) .body() .div(class_("container")) .div(class_("row")) .div(class_("col-lg-12")) .h3() .write("Script ") .small().content(String.format("%s -> %s", fSrc.getName(), fDst.getName())) ._h3() .pre().content(ActionsIoUtils.toText(src, this.script, mappings).toString()) ._div() ._div() ._div() .render(new BootstrapFooterView()) .macros().javascript("/dist/script.js") ._body() ._html(); }
@Override public void renderOn(HtmlCanvas html) throws IOException { html .render(DocType.HTML5) .html(lang("en")) .render(new BootstrapHeaderView()) .body() .div(class_("container")) .div(class_("row")) .div(class_("col-lg-12")) .h3() .write("Script ") .small().content(String.format("%s -> %s", fSrc.getName(), fDst.getName())) ._h3() .pre().content(ActionsIoUtils.toText(src, this.script, mappings).toString()) ._div() ._div() ._div() .render(new BootstrapFooterView()) .macros().javascript("/dist/script.js") ._body() ._html(); }
@Override public void renderOn(HtmlCanvas html) throws IOException { html .render(DocType.HTML5) .html(lang("en")) .render(new BootstrapHeaderView()) .body() .div(class_("container-fluid")) .div(class_("row")) .render(new MenuBar()) ._div() .div(class_("row")) .div(class_("col-lg-6 max-height")) .h5().content(fSrc.getName()) .pre(class_("pre max-height")).content(diffs.getSrcDiff(), false) ._div() .div(class_("col-lg-6 max-height")) .h5().content(fDst.getName()) .pre(class_("pre max-height")).content(diffs.getDstDiff(), false) ._div() ._div() ._div() .render(new BootstrapFooterView()) .macros().javascript("/dist/diff.js") ._body() ._html(); }
@Override public void renderOn(HtmlCanvas html) throws IOException { html .render(DocType.HTML5) .html(lang("en")) .render(new BootstrapHeaderView()) .body() .div(class_("container-fluid")) .div(class_("row")) .render(new MenuBar()) ._div() .div(class_("row")) .div(class_("col-lg-6 max-height")) .h5().content(fSrc.getName()) .pre(class_("pre max-height")).content(diffs.getSrcDiff(), false) ._div() .div(class_("col-lg-6 max-height")) .h5().content(fDst.getName()) .pre(class_("pre max-height")).content(diffs.getDstDiff(), false) ._div() ._div() ._div() .render(new BootstrapFooterView()) .macros().javascript("/dist/diff.js") ._body() ._html(); }