diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-11 21:43:38 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-11 21:43:38 +0400 |
commit | a8e59d7af41ca05b68e2d916552cecbbacbf3e92 (patch) | |
tree | 34c95981c8d08fa28706ad1c8d2ccef91e2776ad /src/main.kt | |
parent | 197a6e486d16d2e3689e900b45c65ef8d598f3b7 (diff) | |
download | dokka-a8e59d7af41ca05b68e2d916552cecbbacbf3e92.tar.gz dokka-a8e59d7af41ca05b68e2d916552cecbbacbf3e92.tar.bz2 dokka-a8e59d7af41ca05b68e2d916552cecbbacbf3e92.zip |
Add tests for comment extraction, support one-line and mutliple joined doc-comments.
Start primitive ConsoleGenerator to dump model.
Diffstat (limited to 'src/main.kt')
-rw-r--r-- | src/main.kt | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/main.kt b/src/main.kt index e385da3f..79a8bfcb 100644 --- a/src/main.kt +++ b/src/main.kt @@ -3,15 +3,23 @@ package org.jetbrains.dokka import com.sampullara.cli.* import com.intellij.openapi.util.* import org.jetbrains.jet.cli.common.messages.* -import org.jetbrains.jet.utils.* -import org.jetbrains.jet.lang.resolve.BindingContext -import org.jetbrains.jet.lang.psi.JetFile -import org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments +import org.jetbrains.jet.cli.common.arguments.* + +class DokkaArguments { + Argument(value = "src", description = "Source file or directory (allows many paths separated by the system path separator)") + ValueDescription("<path>") + public var src: String? = null + + Argument(value = "output", description = "Output directory path for .md files") + ValueDescription("<path>") + public var outputDir: String? = null +} public fun main(args: Array<String>) { - val compilerArguments = K2JVMCompilerArguments() - val sources: List<String> = Args.parse(compilerArguments, args) ?: listOf() + val arguments = DokkaArguments() + val sourceFiles = Args.parse(arguments, args) + val sources: List<String> = sourceFiles ?: listOf() val environment = AnalysisEnvironment(MessageCollectorPlainTextToStream.PLAIN_TEXT_TO_SYSTEM_ERR) { /* @@ -32,6 +40,7 @@ public fun main(args: Array<String>) { context.createDocumentation(file) }.fold(DocumentationModel()) {(aggregate, item) -> aggregate.merge(item) } - println(model) + ConsoleGenerator().generate(model) + Disposer.dispose(environment) }
\ No newline at end of file |