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;
}
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();
}
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();
}
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");
}
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");
}
Aggregations