aboutsummaryrefslogtreecommitdiff
path: root/kvision-tools/kvision-compiler-plugin
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-10-25 20:46:42 +0200
committerRobert Jaros <rjaros@finn.pl>2019-10-25 20:46:42 +0200
commitc78775aa2aaf76f9fa1404ff32a10fb8227f380e (patch)
treea6991e1f520e1ce54679b2194a756203a645f99e /kvision-tools/kvision-compiler-plugin
parenta990385dd3f2dbac4807b7a9498271efb3519c0d (diff)
downloadkvision-c78775aa2aaf76f9fa1404ff32a10fb8227f380e.tar.gz
kvision-c78775aa2aaf76f9fa1404ff32a10fb8227f380e.tar.bz2
kvision-c78775aa2aaf76f9fa1404ff32a10fb8227f380e.zip
Style fixes
Diffstat (limited to 'kvision-tools/kvision-compiler-plugin')
-rw-r--r--kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt15
1 files changed, 9 insertions, 6 deletions
diff --git a/kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt b/kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt
index bf01b463..eba66a9b 100644
--- a/kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt
+++ b/kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt
@@ -53,6 +53,7 @@ class KVProcessor : AbstractProcessor() {
}
}
+ @Suppress("MaxLineLength", "ComplexMethod", "NestedBlockDepth")
override fun process(roundEnvironment: RoundEnvironment) {
val isCommon = this.configuration.kotlinSourceRoots.find { !it.isCommon } == null
if (isCommon) {
@@ -85,8 +86,10 @@ class KVProcessor : AbstractProcessor() {
appendln(" GlobalScope.launch(start = CoroutineStart.UNDISPATCHED) {")
cl.methods().forEach {
when {
- it.returnType.toString().startsWith("RemoteData") -> appendln(" bindTabulatorRemote($iName::${it.name})")
- it.returnType.toString() == "List<RemoteOption>" -> appendln(" bindSelectRemote($iName::${it.name})")
+ it.returnType.toString().startsWith("RemoteData") ->
+ appendln(" bindTabulatorRemote($iName::${it.name})")
+ it.returnType.toString() == "List<RemoteOption>" ->
+ appendln(" bindSelectRemote($iName::${it.name})")
else -> appendln(" bind($iName::${it.name})")
}
}
@@ -180,15 +183,15 @@ class KVProcessor : AbstractProcessor() {
}
private fun getParameterList(params: List<ParameterDescriptor>): String {
- return params.map {
+ return params.joinToString(", ") {
"${it.name.asString()}: ${it.type}"
- }.joinToString(", ")
+ }
}
private fun getParameterNames(params: List<ParameterDescriptor>): String {
- return params.map {
+ return params.joinToString(", ") {
it.name.asString()
- }.joinToString(", ")
+ }
}
private fun getTypes(type: KotlinType): Set<String> {