public void render(AnnotationContext context, String path) throws HammurapiException { final SQLProcessor processor = getProcessor(null); try { FileEntry a = context.getNextFile(".html"); path = a.getPath(); final Writer w = new FileWriter(a.getFile()); try { w.write( "<HTML><BODY><TABLE border=\"1\"><TR><TH>Var Name</TH><TH>Var Value</TH><TH>File</TH><TH>Line</TH><TH>Column</TH><TH>Class</TH><TH>FCN</TH></TR>"); processor.processSelect( "SELECT * FROM (" + // "SELECT 'constant', SOURCE, LINE, COL, '<->', LITERAL, CLASS_NAME, // CLASS_FCN FROM "+sqlTableName // +" UNION " + "SELECT 'variable', SOURCE, LINE, COL, VAR_NAME, VAR_VALUE , CLASS_NAME, CLASS_FCN FROM " + varTableName + ") ORDER BY SOURCE, LINE, COL", null, new RowProcessor() { public boolean process(ResultSet rs) throws SQLException { try { w.write("<TR><TD>"); // w.write(rs.getString("LITERAL")); w.write(rs.getString(5)); w.write("</TD><TD>"); w.write(rs.getString(6)); // VAR_VALUE or LITERAL w.write("</TD><TD>"); // w.write(rs.getString( 1 )); // w.write("</TD><TD>"); w.write(rs.getString("SOURCE")); w.write("</TD><TD aligh=\"right\">"); w.write(rs.getString("LINE")); w.write("</TD><TD aligh=\"right\">"); w.write(rs.getString("COL")); w.write("</TD><TD>"); w.write(rs.getString("CLASS_NAME")); w.write("</TD><TD>"); w.write(rs.getString("CLASS_FCN")); w.write("</TD><TR>"); return true; } catch (IOException e) { throw new HammurapiRuntimeException(e); } } }); /* processor.processSelect( "SELECT * FROM "+varTableName+" ORDER BY SOURCE, LINE, COL, VAR_VALUE, VAR_NAME", null, new RowProcessor() { public boolean process(ResultSet rs) throws SQLException { try { w.write("<TR><TD>"); w.write(rs.getString("VAR_VALUE")); w.write(" :- "); w.write(rs.getString("VAR_NAME")); w.write("</TD><TD>"); w.write(rs.getString("SOURCE")); w.write("</TD><TD aligh=\"right\">"); w.write(rs.getString("LINE")); w.write("</TD><TD aligh=\"right\">"); w.write(rs.getString("COL")); w.write("</TD><TR>"); return true; } catch (IOException e) { throw new HammurapiRuntimeException(e); } } }); */ w.write("</TABLE></BODY></HTML>"); } finally { w.close(); } } catch (SQLException e) { throw new HammurapiException(e); } catch (HammurapiRuntimeException e) { throw new HammurapiException(e.getCause()); } catch (IOException e) { throw new HammurapiException(e); } catch (HammurapiException e) { throw new HammurapiException(e); } }