Package org.codehaus.groovy.tools.groovydoc

Examples of org.codehaus.groovy.tools.groovydoc.GroovyDocTool


        if (sourcePath != null) {
            sourceDirs.addExisting(sourcePath);
        }
        parsePackages(packagesToDoc, sourceDirs);

        GroovyDocTool htmlTool = new GroovyDocTool(
                new ClasspathResourceManager(), // we're gonna get the default templates out of the dist jar file
                sourcePath.list(),
                getDocTemplates(),
                getPackageTemplates(),
                getClassTemplates(),
                links,
                properties
        );

        try {
            htmlTool.add(sourceFilesToDoc);
            FileOutputTool output = new FileOutputTool();
            htmlTool.renderToOutput(output, destDir.getCanonicalPath()); // TODO push destDir through APIs?
        } catch (Exception e) {
            e.printStackTrace();
        }
        // try to override the default stylesheet with custom specified one if needed
        if (styleSheetFile != null) {
View Full Code Here


        if (sourcePath != null) {
            sourceDirs.addExisting(sourcePath);
        }
        parsePackages(packagesToDoc, sourceDirs);     
       
      GroovyDocTool htmlTool = new GroovyDocTool(
        new ClasspathResourceManager(), // we're gonna get the default templates out of the dist jar file
        sourcePath.toString(), // sourcepath                     - TODO multiple paths need to be handled here
        new String[] { // top level templates
            "org/codehaus/groovy/tools/groovydoc/gstring-templates/top-level/index.html",
            "org/codehaus/groovy/tools/groovydoc/gstring-templates/top-level/overview-frame.html", // needs all package names
            "org/codehaus/groovy/tools/groovydoc/gstring-templates/top-level/allclasses-frame.html", // needs all packages / class names
            "org/codehaus/groovy/tools/groovydoc/gstring-templates/top-level/overview-summary.html", // needs all packages
            "org/codehaus/groovy/tools/groovydoc/gstring-templates/top-level/stylesheet.css",
        },
        new String[] { // package level templates
            "org/codehaus/groovy/tools/groovydoc/gstring-templates/package-level/package-frame.html",
            "org/codehaus/groovy/tools/groovydoc/gstring-templates/package-level/package-summary.html"
        },
        new String[] { // class level templates
            "org/codehaus/groovy/tools/groovydoc/gstring-templates/class-level/classDocName.html"
        },
                  links
                );

    try {
      Iterator itr = sourceFilesToDoc.iterator();
      while (itr.hasNext()) {
        htmlTool.add((String) itr.next());
      }
     
      FileOutputTool output = new FileOutputTool();
      htmlTool.renderToOutput(output, destDir.getCanonicalPath()); // TODO push destDir through APIs?
    } catch (Exception e) {
      e.printStackTrace();
    }

    }
View Full Code Here

        if (sourcePath != null) {
            sourceDirs.addExisting(sourcePath);
        }
        parsePackages(packagesToDoc, sourceDirs);

        GroovyDocTool htmlTool = new GroovyDocTool(
                new ClasspathResourceManager(), // we're gonna get the default templates out of the dist jar file
                sourcePath.list(),
                getDocTemplates(),
                getPackageTemplates(),
                getClassTemplates(),
                links,
                properties
        );

        try {
            htmlTool.add(sourceFilesToDoc);
            FileOutputTool output = new FileOutputTool();
            htmlTool.renderToOutput(output, destDir.getCanonicalPath()); // TODO push destDir through APIs?
        } catch (Exception e) {
            e.printStackTrace();
        }
        // try to override the default stylesheet with custom specified one if needed
        if (styleSheetFile != null) {
View Full Code Here

TOP

Related Classes of org.codehaus.groovy.tools.groovydoc.GroovyDocTool

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.