aboutsummaryrefslogtreecommitdiff
path: root/src/Generation/ConsoleGenerator.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/Generation/ConsoleGenerator.kt')
-rw-r--r--src/Generation/ConsoleGenerator.kt17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/Generation/ConsoleGenerator.kt b/src/Generation/ConsoleGenerator.kt
index 3ba42099..af22a622 100644
--- a/src/Generation/ConsoleGenerator.kt
+++ b/src/Generation/ConsoleGenerator.kt
@@ -1,34 +1,33 @@
package org.jetbrains.dokka
public class ConsoleGenerator() {
- val IndentStep = " |"
+ val signatureGenerator = KotlinSignatureGenerator()
+
+ val IndentStep = " "
public fun generate(node: DocumentationNode, indent: String = "") {
generateHeader(node, indent)
- generateDetails(node, indent)
+ //generateDetails(node, indent)
generateMembers(node, indent)
generateLinks(node, indent)
}
public fun generateHeader(node: DocumentationNode, indent: String = "") {
- println("$indent${node.kind}: ${node.name}")
- println("$indent\"${node.doc.summary.replace("\n", "\n$indent")}\"")
+ println(indent + signatureGenerator.render(node))
+ val docString = node.doc.toString()
+ if (!docString.isEmpty())
+ println("$indent\"${docString.replace("\n", "\n$indent")}\"")
println()
}
public fun generateMembers(node: DocumentationNode, indent: String = "") {
val items = node.members
- if (items.isEmpty())
- return
- println("$indent Members")
for (child in items)
generate(child, indent + IndentStep)
}
public fun generateDetails(node: DocumentationNode, indent: String = "") {
val items = node.details
- if (items.isEmpty())
- return
for (child in items)
generate(child, indent + " ")
}