| 318 | } finally { |
| 319 | Execution.context.get().pop() |
| 320 | } |
| 321 | |
| 322 | } |
| 323 | |
| 324 | override fun end(lineErrors: Consumer<Pair<Int, String>>, success: Consumer<String>) { |
| 325 | RemoteEditor.removeBoxFeedback(Optional.of(box), "__redmark__") |
| 326 | |
| 327 | |
| 328 | RemoteEditor.boxFeedback(Optional.of(box), Vec4(0.3, 0.7, 0.3, 0.5)) |
| 329 | Drawing.dirty(box) |
| 330 | } |
| 331 | |
| 332 | override fun setConsoleOutput(stdout: Consumer<String>, stderr: Consumer<String>) { |
| 333 | |
| 334 | |
| 335 | } |
| 336 | |
| 337 | override fun completion( |
| 338 | allText: String, |
| 339 | line: Int, |
| 340 | ch: Int, |
| 341 | results: Consumer<List<Completion>>, |
| 342 | explicit: Boolean |
| 343 | ) { |
| 344 | val lines = allText.split("\n".toRegex()) |
| 345 | var c = 0 |
| 346 | for (i in 0 until line) { |
| 347 | c += lines[i].length + 1 |
| 348 | } |
| 349 | |
| 350 | c += ch |
| 351 | |
| 352 | // val completions = ki.completeAndWait(allText, c) |
| 353 | // when (completions) { |
| 354 | // is KotlinInterface.CompletionResult.Success -> { |
| 355 | // val matches: List<String> = completions.matches |
| 356 | // |
| 357 | // |
| 358 | // val comp = completions.metadata.map { |
| 359 | // if (it.tail == "keyword") |
| 360 | // Completion( |
| 361 | // completions.bounds.start, |
| 362 | // completions.bounds.end, |
| 363 | // it.text, |
| 364 | // "<span class=type>${it.displayText}</span>" |
| 365 | // ) |
| 366 | // else |
| 367 | // Completion( |
| 368 | // completions.bounds.start, |
| 369 | // completions.bounds.end, |
| 370 | // it.text, |
| 371 | // "<span class=type>${it.displayText} -> ${it.tail} <small>${it.icon}</small></span>" |
| 372 | // ) |
| 373 | // } |
| 374 | // results.accept(comp) |
| 375 | // } |
| 376 | // else -> { |
| 377 | // println(" no completions ? ") |
nothing calls this directly
no test coverage detected