aboutsummaryrefslogtreecommitdiff
path: root/doc-tool
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2017-01-31 10:02:15 +0100
committerFelix Mulder <felix.mulder@gmail.com>2017-01-31 14:35:43 +0100
commitfff42b78f1ef4dd4f6b51ebfd2ac8f39dca55c47 (patch)
treeac23fd6812de76bdcfd704c916894c3098c99478 /doc-tool
parent483ac5340db262adb5efcf747a97dc9f25bc0208 (diff)
downloaddotty-fff42b78f1ef4dd4f6b51ebfd2ac8f39dca55c47.tar.gz
dotty-fff42b78f1ef4dd4f6b51ebfd2ac8f39dca55c47.tar.bz2
dotty-fff42b78f1ef4dd4f6b51ebfd2ac8f39dca55c47.zip
Remove faulty dottydoc API
Diffstat (limited to 'doc-tool')
-rw-r--r--doc-tool/src/dotty/tools/dottydoc/api/java/Dottydoc.java48
-rw-r--r--doc-tool/src/dotty/tools/dottydoc/api/scala/Dottydoc.scala39
-rw-r--r--doc-tool/test/GenDocs.scala2
3 files changed, 1 insertions, 88 deletions
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<String, Package> 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<String, Package> 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<String, Package> 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] =