void () { HTMLExportUtil.writeFile(myOutputDir, "index.html", myTree.getContext().getProject(), w -> { appendHeader(w); w.append("<div style=\"width:100%;\"><div style=\"float:left; width:50%;\"><h4>Inspection tree:</h4>"); InspectionTreeTailRenderer<IOException> tailRenderer = new InspectionTreeTailRenderer<>(myTree.getContext()) { @Override protected void appendText(String text, SimpleTextAttributes attributes) throws IOException { w.append(escapeNonBreakingSymbols(text)); } @Override protected void appendText(String text) throws IOException { w.append(escapeNonBreakingSymbols(text)); } }; InspectionTreeModel model = myTree.getInspectionTreeModel(); traverseInspectionTree(model.getRoot(), (n) -> { int nodeId = System.identityHashCode(n); w .append("<li><label for=\"") .append(String.valueOf(nodeId)) .append("\">") .append(convertNodeToHtml(n)) .append("&nbsp;<span class=\"grayout\">"); tailRenderer.appendTailText(n); w.append("</span></label><input type=\"checkbox\" "); if (n instanceof InspectionRootNode) { w.append("checked"); } w.append(" onclick=\"navigate(").append(String.valueOf(nodeId)).append(")\" "); w.append(" id=\"").append(String.valueOf(nodeId)).append("\" />"); if (n instanceof SuppressableInspectionTreeNode) { RefEntity e = ((SuppressableInspectionTreeNode)n).getElement(); if (e != null) { w .append("<div id=\"d") .append(String.valueOf(nodeId)) .append("\" style=\"display:none\">"); StringBuilder buf = new StringBuilder(); ((SuppressableInspectionTreeNode)n).getPresentation().getComposer().compose(buf, e); w.append(buf.toString()); w.append("</div>"); } } w.append("<ol class=\"tree\">"); }, (n) -> w.append("</ol></li>")); w.append("</div><div style=\"float:left; width:50%;\"><h4>Problem description:</h4>" + "<div id=\"preview\">Select a problem element in tree</div></div><div></body></html>"); }); InspectionTreeHtmlExportResources.copyInspectionReportResources(myOutputDir); }