diff options
author | Eugene Petrenko <eugene.petrenko@jetbrains.com> | 2018-09-14 00:23:36 +0300 |
---|---|---|
committer | Eugene Petrenko <eugene.petrenko@jetbrains.com> | 2018-09-14 00:23:36 +0300 |
commit | dd9e016b11de0cea2e49d8831b2b04fd0b898c3c (patch) | |
tree | 82be5b9c27a49124d5998ce05a93b0572b3a5b4d | |
parent | 9521c1100eb8c6c09d71352ba49eca66c7612a55 (diff) | |
download | dokka-dd9e016b11de0cea2e49d8831b2b04fd0b898c3c.tar.gz dokka-dd9e016b11de0cea2e49d8831b2b04fd0b898c3c.tar.bz2 dokka-dd9e016b11de0cea2e49d8831b2b04fd0b898c3c.zip |
cleanup
-rw-r--r-- | core/src/main/kotlin/Generation/FileGenerator.kt | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/core/src/main/kotlin/Generation/FileGenerator.kt b/core/src/main/kotlin/Generation/FileGenerator.kt index f9104110..40348be0 100644 --- a/core/src/main/kotlin/Generation/FileGenerator.kt +++ b/core/src/main/kotlin/Generation/FileGenerator.kt @@ -22,21 +22,13 @@ class FileGenerator @Inject constructor(@Named("outputDir") override val root: F return File(root, relativePathToNode(node)).appendExtension(extension) } - fun locationWithoutExtension(node: DocumentationNode): FileLocation { + private fun locationWithoutExtension(node: DocumentationNode): FileLocation { return FileLocation(fileForNode(node)) } override fun buildPages(nodes: Iterable<DocumentationNode>) { for ((file, items) in nodes.groupBy { fileForNode(it, formatService.extension) }) { - - if (items.size > 1) { - println("An attempt to generate ${root.toPath().relativize(file.toPath())} for: ") - for (item in items) { - println(" ${item.allReferences().map { "${it.to.kind} ${it.to.name }" } }") - } - } - file.parentFile?.mkdirsOrFail() try { FileOutputStream(file).use { @@ -86,10 +78,9 @@ class FileGenerator @Inject constructor(@Named("outputDir") override val root: F } -} - -private fun File.mkdirsOrFail() { - if (!mkdirs() && !exists()) { - throw IOException("Failed to create directory $this") + private fun File.mkdirsOrFail() { + if (!mkdirs() && !exists()) { + throw IOException("Failed to create directory $this") + } } -}
\ No newline at end of file +} |