KetraTerm
API · v0.2.2All versions

SwingCompletionBinding

class SwingCompletionBinding(session: TerminalSession, rankingContextKey: () -> String? = { null }) : AutoCloseable

Connects optional host completion resources to one Swing terminal.

Hosts own provider construction and persistence. This binding owns automatic observation and forwards requests only to the current resources. Configure, attach, and close on the EDT. An empty binding starts no coroutine work.

Constructors

Link copied to clipboard
constructor(session: TerminalSession, rankingContextKey: () -> String? = { null })

Properties

Link copied to clipboard

Stable callback; obsolete or disabled bindings cannot record feedback.

Link copied to clipboard

Whether this pane currently has a host-provided completion implementation.

Link copied to clipboard

Stable provider installed in host services before the terminal is attached.

Functions

Link copied to clipboard
fun attach(terminal: SwingTerminal)

Attaches once after the terminal has been bound to its session.

Link copied to clipboard
open override fun close()

Cancels requests and observation and releases references to host resources.

Link copied to clipboard
fun update(resources: SwingCompletionResources?, automaticPopup: Boolean)

Replaces resources; null disables all completion and releases observation.