Package io.deephaven.lang.completion
Class CompletionRequest
java.lang.Object
io.deephaven.lang.completion.CompletionRequest
A stateful object to represent a document search at a given position.
When we search left or right from an intermediate node like whitespace, dot, comma or EOF, we will create a new
CompletionRequest at the new index.
This currently uses absolute cursor positions, but we want this to be a line/column position instead, so we can
completely remove consideration of absolute cursors.
This mistake was made by trying to base V2 on V1 semantics which are not really relevant when considering Monaco, LSP
and Javacc which all use line/column semantics.
Absolute cursor positions are unfortunately deeply entwined in
ChunkerCompleter
, so we are leaving it in
place for now.
Note that this class also maintains a map of loaded table definitions, so that repeated completions will not pay to
load the same table definition more than once.-
Constructor Summary
ConstructorDescriptionCompletionRequest
(@NotNull ChunkerCompleter completer, String command, int offset) -
Method Summary
Modifier and TypeMethodDescriptioncandidate
(int index) int
int
getTableDefinition
(ChunkerCompleter completer, ParsedDocument doc, QueryScope variables, String name) toString()
-
Constructor Details
-
CompletionRequest
-
-
Method Details
-
getSource
-
getOffset
public int getOffset() -
getBeforeCursor
-
getCandidate
public int getCandidate() -
candidate
-
getTableDefinition
public TableDefinition getTableDefinition(ChunkerCompleter completer, ParsedDocument doc, QueryScope variables, String name) -
toString
-