From dd9e016b11de0cea2e49d8831b2b04fd0b898c3c Mon Sep 17 00:00:00 2001
From: Eugene Petrenko <eugene.petrenko@jetbrains.com>
Date: Fri, 14 Sep 2018 00:23:36 +0300
Subject: cleanup

---
 core/src/main/kotlin/Generation/FileGenerator.kt | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

(limited to 'core/src/main')

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
+}
-- 
cgit