Create From Usage: Do not generate unnecessary/skip necessary empty lines

This commit is contained in:
Alexey Sedunov
2014-11-12 15:49:06 +03:00
parent 2e7cbab453
commit c487cc7838
123 changed files with 141 additions and 154 deletions
@@ -109,10 +109,15 @@ public class JetPsiFactory(private val project: Project) {
return createProperty("val${text}x").findElementAt(3)!!
}
// Remove when all Java usages are rewritten to Kotlin
public fun createNewLine(): PsiElement {
return createWhiteSpace("\n")
}
public fun createNewLine(lineBreaks: Int): PsiElement {
return createWhiteSpace("\n".repeat(lineBreaks))
}
public fun createClass(text: String): JetClass {
return createDeclaration(text)
}