Package com.redhat.ceylon.ceylondoc

Examples of com.redhat.ceylon.ceylondoc.CeylonDocTool


   
    private CeylonDocTool tool(List<File> sourceFolders, List<File> docFolders, List<String> moduleName,
            boolean haltOnError, boolean deleteDestDir, String... repositories)
            throws Exception {
       
        CeylonDocTool tool = new CeylonDocTool();
        tool.setSourceFolders(sourceFolders);
        tool.setRepositoryAsStrings(Arrays.asList(repositories));
        tool.setModuleSpecs(moduleName);
        tool.setDocFolders(docFolders);
        tool.setHaltOnError(haltOnError);
        File dir = new File("build", "CeylonDocToolTest/" + name.getMethodName());
        if (deleteDestDir && dir.exists()) {
            FileUtil.delete(dir);
        }
        tool.setOut(dir.getAbsolutePath());
        tool.initialize();
        return tool;
    }
View Full Code Here


    private void moduleA(boolean includeNonShared) throws Exception {
        String pathname = "test/ceylondoc";
        String docname = "test/ceylondoc-doc";
        String moduleName = "com.redhat.ceylon.ceylondoc.test.modules.single";

        CeylonDocTool tool = tool(pathname, docname, moduleName, true);
        tool.setIncludeNonShared(includeNonShared);
        tool.setIncludeSourceCode(true);
        tool.setHeader("<div class='navbar-inverse navbar-static-top'>" +
                       "<div class='navbar-inner' style='color:white; font-style: italic; text-align: center'>" +
                           "documentation under construction" +
                       "</div>" +
                   "</div>");
        tool.setFooter("<p style='text-align: right;'>" +
                   "Copyright © 2010-2013, Red Hat, Inc. or third-party contributors" +
                   "</p>");
        tool.run();
       
        Module module = new Module();
        module.setName(Arrays.asList(moduleName));
        module.setVersion("3.1.4");
       
View Full Code Here

        List<String> modules = new ArrayList<String>();
        modules.add("com.redhat.ceylon.ceylondoc.test.modules.dependency.b");
        modules.add("com.redhat.ceylon.ceylondoc.test.modules.dependency.c");
        modules.add("com.redhat.ceylon.ceylondoc.test.modules.externallinks");

        CeylonDocTool tool = tool(Arrays.asList(new File("test/ceylondoc")), Collections.<File>emptyList(), modules, true, true, "build/ceylon-cars");
        tool.setLinks(Arrays.asList(linkArgs));
        tool.run();

        Module module = new Module();
        module.setName(Arrays.asList("com.redhat.ceylon.ceylondoc.test.modules.externallinks"));
        module.setVersion("1.0");       
View Full Code Here

        String pathname = "test/ceylondoc";
       
        // compile the b module
        compile(pathname, "com.redhat.ceylon.ceylondoc.test.modules.dependency.b");
       
        CeylonDocTool tool = tool(pathname, "com.redhat.ceylon.ceylondoc.test.modules.dependency.c", true, "build/ceylon-cars");
        tool.run();
    }
View Full Code Here

        // compile the a and b modules
        compile(pathname, "com.redhat.ceylon.ceylondoc.test.modules.classloading.a");
        compile(pathname, "com.redhat.ceylon.ceylondoc.test.modules.classloading.b");
       
        // now run docs on c, which uses b, which uses a
        CeylonDocTool tool = tool(pathname, "com.redhat.ceylon.ceylondoc.test.modules.classloading.c", true, "build/ceylon-cars");
        tool.run();
    }
View Full Code Here

        String moduleName = "com.redhat.ceylon.ceylondoc.test.modules.mixed";
       
        // compile the java code first
        compileJavaModule(pathname, "com/redhat/ceylon/ceylondoc/test/modules/mixed/Java.java");
       
        CeylonDocTool tool = tool(pathname, moduleName, true, "build/ceylon-cars");
        tool.run();
    }
View Full Code Here

    @Test
    public void documentSingleModule() throws Exception {
        String pathname = "test/ceylondoc";
        String moduleName = "com.redhat.ceylon.ceylondoc.test.modules.multi.a";
       
        CeylonDocTool tool = tool(pathname, moduleName, true, "build/ceylon-cars");
        tool.run();

        Module a = makeModule("com.redhat.ceylon.ceylondoc.test.modules.multi.a", "1");
        File destDirA = getOutputDir(tool, a);
        Module b = makeModule("com.redhat.ceylon.ceylondoc.test.modules.multi.b", "1");
        File destDirB = getOutputDir(tool, b);
View Full Code Here

    public void documentPackage() throws Exception {
        String pathname = "test/ceylondoc";
        String moduleName = "com.redhat.ceylon.ceylondoc.test.modules.multi.a.sub";
       
        try{
            CeylonDocTool tool = tool(pathname, moduleName, true, "build/ceylon-cars");
            tool.run();
        }catch(RuntimeException x){
            Assert.assertEquals("Can't find module: com.redhat.ceylon.ceylondoc.test.modules.multi.a.sub", x.getMessage());
            return;
        }
        Assert.fail("Expected exception");
View Full Code Here

    @Test
    public void documentDefaultModule() throws Exception {
        String pathname = "test/ceylondoc";
        String moduleName = "default";
       
        CeylonDocTool tool = tool(pathname, moduleName, true, "build/ceylon-cars");
        tool.setIncludeNonShared(true);
        tool.run();

        Module a = makeModule("com.redhat.ceylon.ceylondoc.test.modules.multi.a", "1");
        File destDirA = getOutputDir(tool, a);
        Module b = makeModule("com.redhat.ceylon.ceylondoc.test.modules.multi.b", "1");
        File destDirB = getOutputDir(tool, b);
View Full Code Here

    @Test
    public void ceylonLanguage() throws Exception {
        String pathname = "../ceylon.language/src";
        String moduleName = AbstractModelLoader.CEYLON_LANGUAGE;
        CeylonDocTool tool = tool(pathname, moduleName, true);
        tool.setIncludeNonShared(false);
        tool.setIncludeSourceCode(true);
        tool.run();
       
        Module module = makeModule(AbstractModelLoader.CEYLON_LANGUAGE, LANGUAGE_MODULE_VERSION);
        File destDir = getOutputDir(tool, module);
       
        assertFileExists(destDir, "index.html");
View Full Code Here

TOP

Related Classes of com.redhat.ceylon.ceylondoc.CeylonDocTool

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.