From fff42b78f1ef4dd4f6b51ebfd2ac8f39dca55c47 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Tue, 31 Jan 2017 10:02:15 +0100 Subject: Remove faulty dottydoc API --- .../dotty/tools/dottydoc/api/java/Dottydoc.java | 48 ---------------------- .../dotty/tools/dottydoc/api/scala/Dottydoc.scala | 39 ------------------ doc-tool/test/GenDocs.scala | 2 +- 3 files changed, 1 insertion(+), 88 deletions(-) delete mode 100644 doc-tool/src/dotty/tools/dottydoc/api/java/Dottydoc.java delete mode 100644 doc-tool/src/dotty/tools/dottydoc/api/scala/Dottydoc.scala (limited to 'doc-tool') diff --git a/doc-tool/src/dotty/tools/dottydoc/api/java/Dottydoc.java b/doc-tool/src/dotty/tools/dottydoc/api/java/Dottydoc.java deleted file mode 100644 index a44413c75..000000000 --- a/doc-tool/src/dotty/tools/dottydoc/api/java/Dottydoc.java +++ /dev/null @@ -1,48 +0,0 @@ -package dotty.tools.dottydoc.api.java; - -import dotty.tools.dottydoc.DocDriver; -import dotty.tools.dottydoc.model.Package; -import java.util.Map; -import java.util.List; -import java.net.URL; - -/** - * The Dottydoc API is fairly simple. The tool creates an index by calling: - * "createIndex" with the same argument list as you would the compiler - e.g: - * - * {{{ - * String[] array = { - * "-language:Scala2" - * }; - * - * Map index = createIndex(array); - * }}} - * - * Once the index has been generated, the tool can also build a documentation - * API given a Mustache template and a flat resources structure (i.e. absolute - * paths to each resource, which will be put in the same directory). - * - * {{{ - * buildDocs("path/to/output/dir", templateURL, resources, index); - * }}} - * - * The tool can also generate JSON from the created index using "toJson(index)" - * or directly using "createJsonIndex" - */ -public class Dottydoc { - private DocDriver driver = new DocDriver(); - - /** Creates index from compiler arguments */ - public Map createIndex(String[] args) { - return driver.compiledDocsJava(args); - } - - /** Creates JSON from compiler arguments */ - public String createJsonIndex(String[] args) { - return driver.indexToJsonJava(createIndex(args)); - } - - public String toJson(Map index) { - return driver.indexToJsonJava(index); - } -} diff --git a/doc-tool/src/dotty/tools/dottydoc/api/scala/Dottydoc.scala b/doc-tool/src/dotty/tools/dottydoc/api/scala/Dottydoc.scala deleted file mode 100644 index 9d00b08a3..000000000 --- a/doc-tool/src/dotty/tools/dottydoc/api/scala/Dottydoc.scala +++ /dev/null @@ -1,39 +0,0 @@ -package dotty.tools.dottydoc.api.scala - -import dotty.tools.dottydoc.DocDriver -import dotty.tools.dottydoc.model.Package - -import scala.collection.Map -import java.net.URL - -/** The Dottydoc API is fairly simple. The tool creates an index by calling: - * `createIndex` with the same argument list as you would the compiler - e.g: - * - * ```scala - * val array: Array[String] = Array( - * "-language:Scala2" - * ) - * - * val index: Map[String, Package] = createIndex(array) - * ``` - * - * Once the index has been generated, the tool can also build a documentation - * API given a Mustache template and a flat resources structure (i.e. absolute - * paths to each resource, which will be put in the same directory). - * - * ```scala - * buildDocs("path/to/output/dir", templateURL, resources, index) - * ``` - * - * The tool can also generate JSON from the created index using `indexToJson` - * or directly using `createJsonIndex` - */ -trait Dottydoc extends DocDriver { - /** Creates index from compiler arguments */ - def createIndex(args: Array[String]): Map[String, Package] = - compiledDocs(args) - - /** Creates JSON from compiler arguments */ - def createJsonIndex(args: Array[String]): String = - indexToJson(compiledDocs(args)) -} diff --git a/doc-tool/test/GenDocs.scala b/doc-tool/test/GenDocs.scala index 9a911d4eb..edd05acc2 100644 --- a/doc-tool/test/GenDocs.scala +++ b/doc-tool/test/GenDocs.scala @@ -9,7 +9,7 @@ object Files { } } -trait LocalResources extends api.scala.Dottydoc { +trait LocalResources extends DocDriver { import Files._ def getFiles(file: JFile): Array[JFile] = -- cgit v1.2.3