/** * Process the input file and generates the output. The bugreport is already loaded and split in * section. It executes the plugins generating the internal representation of the report, and then * renders the output html files. */ public final void generate() throws IOException { // Make sure it has a name mDoc.setFileName(mFileName.get()); mContext.setLogOutput(getBaseDir() + "/" + LOG_NAME); mDoc.begin(); // Allow sub-classes to pre-process data preProcess(); // Run all the plugins runPlugins(); // Collect detected bugs printOut(1, "Collecting errors..."); collectBugs(); // Copy over some builtin resources printOut(1, "Copying extra resources..."); copyRes(COMMON_RES); // Save each section as raw file printOut(1, "Saving raw sections"); saveSections(); // Allow sub-classes to post-process data and do cleanup postProcess(); // Cleanup plugins finish(); // Render the html files mDoc.end(); printOut(1, "DONE!"); }
private void copyRes(String resources[]) throws IOException { for (String res : resources) { copyRes(res, "data" + res); } }