HtmlModuleGenerator implements HtmlGenerator { @Override public void generate(PrintWriter out, Module[] modules, String version) throws IOException { if (modules == null) { return; } for (int i = 0, modulesLength = modules.length; i < modulesLength; i++) { Module module = modules[i]; writeHeader(out, module); out.println("<div class=\"description\">"); out.println(module.getDescription()); out.println("</div>"); final Dependency[] dependencies = module.getDeclaredDependencies(); if (dependencies != null && dependencies.length > 0) { out.println("<p>"); out.println( "<a href=\"JavaScript:doMenu('main" + i + "');\" id=\"xmain" + i + "\">[+]</a> Depends on:<br>"); out.print("<div id=\"main" + i + "\" style=\"display:none\">"); out.println("<ul>"); for (Dependency dependency : dependencies) { writeDependency(out, modules, dependency); } out.println("</ul>"); out.println("</div>"); out.println("</p>"); } writeFooter(out, module); } } HtmlModuleGenerator(); @Override void generate(PrintWriter out, Module[] modules, String version);  }
@Ignore @Test public void testParsing() throws IOException, CoreException, URISyntaxException, SAXException, ParserConfigurationException { final String someResource = getClass().getResource("dummy_resource").getFile(); final String resourceDir = new File(someResource).getParent(); URL repositoryUrl = new URL( "http: final File dest = new File(resourceDir + File.separator + "testGeneration.html"); PrintWriter pw = new PrintWriter(dest); log.setLevel( Level.OFF ); RepositoryScanner moduleScanner = new RepositoryScanner(log, repositoryUrl, ProxyConfig.NULL); Module[] modules = moduleScanner.scan(ProgressMonitor.NULL); HtmlGenerator generator = new PageDecoratorGenerator( new MultiplePassGenerator(new HtmlGenerator[]{htmlModuleGenerator})); generator.generate(pw, modules, repositoryUrl.toString()); pw.close(); }