public void right(Parse cell) { cell.addToTag(" class=\"pass\""); counts.right++; }
public void wrong(Parse cell) { cell.addToTag(" class=\"fail\""); counts.wrong++; }
public void right(Parse cell) { cell.addToTag(" bgcolor=\"" + green + "\""); counts.right++; }
public void ignore(Parse cell) { cell.addToTag(" bgcolor=\"" + gray + "\""); counts.ignores++; }
public void ignore(Parse cell) { cell.addToTag(" class=\"ignore\""); counts.ignores++; }
public void wrong(Parse cell) { cell.addToTag(" class=\"fail\""); counts.wrong++; }
public void ignore(Parse cell) { cell.addToTag(" class=\"ignore\""); counts.ignores++; }
public void right(Parse cell) { cell.addToTag(" class=\"pass\""); counts.right++; }
public void exception(Parse cell, Throwable exception) { while (exception.getClass().equals(InvocationTargetException.class)) { exception = ((InvocationTargetException) exception).getTargetException(); } if (isFriendlyException(exception)) { cell.addToBody("<hr/>" + label(exception.getMessage())); } else { final StringWriter buf = new StringWriter(); exception.printStackTrace(new PrintWriter(buf)); cell.addToBody("<hr><pre><div class=\"fit_stacktrace\">" + (buf.toString()) + "</div></pre>"); } cell.addToTag(" class=\"error\""); counts.exceptions++; }
public void exception(Parse cell, Throwable exception) { while (exception.getClass().equals(InvocationTargetException.class)) { exception = ((InvocationTargetException) exception).getTargetException(); } if (isFriendlyException(exception)) { cell.addToBody("<hr/>" + label(exception.getMessage())); } else { final StringWriter buf = new StringWriter(); exception.printStackTrace(new PrintWriter(buf)); cell.addToBody("<hr><pre><div class=\"fit_stacktrace\">" + (buf.toString()) + "</div></pre>"); } cell.addToTag(" class=\"error\""); counts.exceptions++; }
public Parse makeMessageCell(Exception e) { Parse errorCell = new Parse("td", "", null, null); final StringWriter buffer = new StringWriter(); e.printStackTrace(new PrintWriter(buffer)); errorCell.addToTag(" colspan=\"" + (columnBindings.length + 1) + "\""); errorCell.addToBody("<i>" + ERROR_INDICATOR + e.getMessage() + "</i>"); errorCell.addToBody("<pre>" + (buffer.toString()) + "</pre>"); wrong(errorCell); return errorCell; }
public Parse makeMessageCell(Exception e) { Parse errorCell = new Parse("td", "", null, null); final StringWriter buffer = new StringWriter(); e.printStackTrace(new PrintWriter(buffer)); errorCell.addToTag(" colspan=\"" + (columnBindings.length + 1) + "\""); errorCell.addToBody("<i>" + ERROR_INDICATOR + e.getMessage() + "</i>"); errorCell.addToBody("<pre>" + (buffer.toString()) + "</pre>"); wrong(errorCell); return errorCell; }
public void wrong(Parse cell) { cell.addToTag(" bgcolor=\"" + red + "\""); cell.body = escape(cell.text()); counts.wrong++; }
public void error(Parse cell, String message) { cell.body = escape(cell.text()); cell.addToBody("<hr><pre>" + escape(message) + "</pre>"); cell.addToTag(" bgcolor=\"" + yellow + "\""); counts.exceptions++; }
protected Parse buildCells(Object row) { if (row == null) { Parse nil = new Parse("td", "null", null, null); nil.addToTag(" colspan="+columnBindings.length); return nil; } Parse root = new Parse(null, null, null, null); Parse next = root; for (int i=0; i<columnBindings.length; i++) { next = next.more = new Parse("td", " ", null, null); TypeAdapter a = columnBindings[i]; if (a == null) { ignore (next); } else { try { a.target = row; info(next, a.toString(a.get())); } catch (Exception e) { exception(next, e); } } } return root.more; } }
protected Parse buildCells(Object row) { if (row == null) { Parse nil = new Parse("td", "null", null, null); nil.addToTag(" colspan=" + columnBindings.length); return nil; } Parse root = new Parse(null, null, null, null); Parse next = root; for (Binding columnBinding : columnBindings) { next = next.more = new Parse("td", " ", null, null); TypeAdapter a = columnBinding.adapter; if (a == null) { ignore(next); } else { try { a.target = row; next.body = gray(escape(a.toString(a.get()))); } catch (Exception e) { exception(next, e); } } } return root.more; } }
protected Parse buildCells(Object row) { if (row == null) { Parse nil = new Parse("td", "null", null, null); nil.addToTag(" colspan=" + columnBindings.length); return nil; } Parse root = new Parse(null, null, null, null); Parse next = root; for (Binding columnBinding : columnBindings) { next = next.more = new Parse("td", " ", null, null); TypeAdapter a = columnBinding.adapter; if (a == null) { ignore(next); } else { try { a.target = row; next.body = gray(escape(a.toString(a.get()))); } catch (Exception e) { exception(next, e); } } } return root.more; } }