aboutsummaryrefslogtreecommitdiff
path: root/kvision-tools/kvision-compiler-plugin/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'kvision-tools/kvision-compiler-plugin/src/main/kotlin')
-rw-r--r--kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt4
1 files changed, 3 insertions, 1 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 5d5cc514..6a0a0130 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
@@ -158,12 +158,14 @@ class KVProcessor : AbstractProcessor() {
appendln("//")
appendln("package $packageName")
appendln()
+ appendln("import pl.treksoft.jquery.JQueryAjaxSettings")
+ appendln("import pl.treksoft.jquery.JQueryXHR")
appendln("import pl.treksoft.kvision.remote.KVRemoteAgent")
getTypes(cl.methods()).sorted().forEach {
appendln("import $it")
}
appendln()
- appendln("actual class $baseName : $iName, KVRemoteAgent<$baseName>(${baseName}Manager) {")
+ appendln("actual class $baseName(beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null) : $iName, KVRemoteAgent<$baseName>(${baseName}Manager, beforeSend) {")
cl.methods().forEach {
val name = it.name
val params = it.allParameters.drop(1)