Search in sources :

Example 16 with CeylonDocTool

use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.

the class CeylonDocToolTests method tool.

private CeylonDocTool tool(List<File> sourceFolders, String[] repositories, String overrides, List<File> docFolders, List<String> moduleName, boolean haltOnError, boolean deleteDestDir, boolean bootstrapCeylon) throws Exception {
    CeylonDocTool tool = new CeylonDocTool();
    tool.setSystemRepository("../dist/dist/repo");
    tool.setSourceFolders(sourceFolders);
    tool.setRepositoryAsStrings(Arrays.asList(repositories));
    tool.setModuleSpecs(moduleName);
    tool.setDocFolders(docFolders);
    tool.setHaltOnError(haltOnError);
    tool.setBootstrapCeylon(bootstrapCeylon);
    File dir = new File("build", "CeylonDocToolTest/" + name.getMethodName());
    if (deleteDestDir && dir.exists()) {
        FileUtil.delete(dir);
    }
    tool.setOut(dir.getAbsolutePath());
    if (overrides != null) {
        tool.setOverrides(overrides);
    }
    tool.initialize(new CeylonTool());
    return tool;
}
Also used : CeylonDocTool(org.eclipse.ceylon.ceylondoc.CeylonDocTool) CeylonTool(org.eclipse.ceylon.common.tools.CeylonTool) File(java.io.File)

Example 17 with CeylonDocTool

use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.

the class CeylonDocToolTests method bug1622.

@Test
public void bug1622() throws Exception {
    File dir = new File("build", "CeylonDocToolTest/" + name.getMethodName());
    String pathname = "test/ceylondoc";
    String moduleName = "org.eclipse.ceylon.ceylondoc.test.modules.bug1622";
    compile(pathname, dir.getPath(), moduleName);
    CeylonDocTool tool = tool(Arrays.asList(new File(pathname)), Arrays.asList(new File("doc")), Arrays.asList(moduleName), true, false, false);
    tool.setIncludeNonShared(true);
    tool.run();
}
Also used : CeylonDocTool(org.eclipse.ceylon.ceylondoc.CeylonDocTool) File(java.io.File) Test(org.junit.Test)

Example 18 with CeylonDocTool

use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.

the class CeylonDocToolTests method classLoading.

@Test
public void classLoading() throws Exception {
    String pathname = "test/ceylondoc";
    // compile the a and b modules
    compile(pathname, "org.eclipse.ceylon.ceylondoc.test.modules.classloading.a");
    compile(pathname, "org.eclipse.ceylon.ceylondoc.test.modules.classloading.b");
    // now run docs on c, which uses b, which uses a
    CeylonDocTool tool = tool(pathname, "org.eclipse.ceylon.ceylondoc.test.modules.classloading.c", true, "build/ceylon-cars");
    tool.run();
}
Also used : CeylonDocTool(org.eclipse.ceylon.ceylondoc.CeylonDocTool) Test(org.junit.Test)

Example 19 with CeylonDocTool

use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.

the class CeylonDocToolTests method customResourcesFolder.

@Test
public void customResourcesFolder() throws Exception {
    String pathname = "test/ceylondoc";
    String docname = "test/ceylondoc-doc";
    String moduleName = "org.eclipse.ceylon.ceylondoc.test.modules.single";
    CeylonDocTool tool = tool(pathname, docname, moduleName, true, false);
    tool.setResourceFolder("assets");
    tool.run();
    File destDir = getOutputDir(tool, moduleName, "3.1.4");
    assertResourcesExists(destDir, "assets");
}
Also used : CeylonDocTool(org.eclipse.ceylon.ceylondoc.CeylonDocTool) File(java.io.File) Test(org.junit.Test)

Example 20 with CeylonDocTool

use of org.eclipse.ceylon.ceylondoc.CeylonDocTool in project ceylon by eclipse.

the class CeylonDocToolTests method documentDynamics.

@Test
public void documentDynamics() throws Exception {
    String pathname = "test/ceylondoc";
    String moduleName = "org.eclipse.ceylon.ceylondoc.test.modules.dynamics";
    CeylonDocTool tool = tool(pathname, moduleName, true, "build/ceylon-cars");
    tool.run();
    File destDir = getOutputDir(tool, "org.eclipse.ceylon.ceylondoc.test.modules.dynamics", "1.0.0");
    assertFileExists(destDir, "index.html");
    assertFileExists(destDir, "DynaTest.type.html");
}
Also used : CeylonDocTool(org.eclipse.ceylon.ceylondoc.CeylonDocTool) File(java.io.File) Test(org.junit.Test)

Aggregations

CeylonDocTool (org.eclipse.ceylon.ceylondoc.CeylonDocTool)23 Test (org.junit.Test)20 File (java.io.File)16 Module (org.eclipse.ceylon.model.typechecker.model.Module)3 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 CeylonTool (org.eclipse.ceylon.common.tools.CeylonTool)1