MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / begin

Method begin

src/main/java/fieldpython/PI.kt:320–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 ? ")

Callers

nothing calls this directly

Calls 15

frameFunction · 0.85
endFunction · 0.85
removeBoxFeedbackMethod · 0.80
boxFeedbackMethod · 0.80
putToMapMethod · 0.80
firstMethod · 0.80
computeIfAbsentMethod · 0.80
getMethod · 0.65
execMethod · 0.65
resetMethod · 0.65
acceptMethod · 0.65
Vec4Class · 0.50

Tested by

no test coverage detected