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

Method end

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

Source from the content-addressed store, hash-verified

390 c += ch
391
392 var found = allText.substring(0, c).indexOfLast {
393 it.isWhitespace()
394 }
395 val prefix = allText.substring(found + 1, c)
396
397 val possible = JavaSupport.javaSupport.getPossibleJavaClassesFor(prefix)
398
399 val r = mutableListOf<Completion>()
400 for (p in possible) {
401 val tail = Math.max(p.first.lastIndexOf("."), p.first.lastIndexOf("$"))
402 val ex = Completion(
403 c - prefix.length, c, p.first.substring(
404 tail +
405 1
406 ), p.second
407 )
408 var typeName = p.first.replace("\\$".toRegex(), ".")
409 if (typeName.endsWith(".")) typeName = typeName.substring(0, typeName.length - 1)
410// ex.header = ("var " + p.first.substring(tail + 1) + " = Java.type('" + typeName
411// + "')")
412 ex.header = "import ${typeName}"
413 r.add(ex)
414 }
415
416 results.accept(r)
417

Callers

nothing calls this directly

Calls 9

removeBoxFeedbackMethod · 0.80
compileMethod · 0.80
boxFeedbackMethod · 0.80
getMethod · 0.65
acceptMethod · 0.65
Vec4Class · 0.50
matchesMethod · 0.45
removeMethod · 0.45
dirtyMethod · 0.45

Tested by

no test coverage detected