Index: ReportGenerator.java =================================================================== --- ReportGenerator.java (revision 3583) +++ ReportGenerator.java (working copy) @@ -24,9 +24,11 @@ import com.unitesk.requality.eclipse.Activator; import com.unitesk.requality.nodetypes.Requirement; +import com.unitesk.requality.nodetypes.Document; import com.unitesk.requality.tests.CoverageFromFile; import com.unitesk.requality.tests.CoverageStorage; import com.unitesk.requality.tools.RequalityCLI; +import com.unitesk.requality.tools.DeepFirstTreeWalker; import freemarker.template.Configuration; import freemarker.template.DefaultObjectWrapper; @@ -44,6 +46,18 @@ Configuration cfg = new Configuration(); cfg.setObjectWrapper(new DefaultObjectWrapper()); cfg.setDirectoryForTemplateLoading(new File(templ.getReportPath())); + + Map documents = new HashMap(); + for (TreeNode node : new DeepFirstTreeWalker(rootReq.getTreeDB().getNode(Document.getTypeRootQId()))) + { + if (!node.getType().equals(Document.TYPE_NAME)) { + continue; + } + Document doc = (Document) node; + documents.put(doc.getResourceName(), + freemarker.ext.dom.NodeModel.parse(new File(doc.getHTMLPath()))); + } + for (TemplateFile t : templ.getTemplates()) { File outFile = new File(saveTo + File.separator + t.getOutputFileName()); @@ -63,6 +77,7 @@ data.put("reportLocation", saveTo); data.put("rootReq", rootReq); data.put("root", rootReq.getTreeDB().getRootNode()); + data.put("documents", documents); CoverageStorage cs; if(data.containsKey("coverageStorageType")){ String type = (String) data.get("coverageStorageType"), setts = (String) data.get("coverageStorageSettings");