Package io.deephaven.lang.completion
Class ChunkerCompleter
java.lang.Object
io.deephaven.lang.completion.ChunkerCompleter
- All Implemented Interfaces:
CompletionHandler
Uses a ChunkerDocument to lookup user cursor and perform autocompletion.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionChunkerCompleter
(Logger log, QueryScope variables) ChunkerCompleter
(Logger log, QueryScope variables, CompletionLookups lookups) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMatch
(Collection<CompletionItem.Builder> results, Node node, String match, CompletionRequest index, String... nextTokens) Deprecated.CompletableFuture<? extends Collection<CompletionFragment>>
findAssignment
(ParsedDocument doc, CompletionRequest request, String name) getQuoteType
(Node node) protected Map<String,
TableDefinition> runCompletion
(ParsedDocument doc, int offset) Part 1 of the V2 completion api; adapting our API to fit into existing CompletionHandler semantics.runCompletion
(ParsedDocument doc, Position pos, int offset) void
setDefaultQuoteType
(String defaultQuoteType) sliceBefore
(CompletionItem.Builder item, Position requested, Node node) static String
sortable
(int i) stringLiteral
(Node ns)
-
Field Details
-
CONTAINS_NEWLINE
- See Also:
-
PROP_SUGGEST_STATIC_METHODS
- See Also:
-
-
Constructor Details
-
ChunkerCompleter
-
ChunkerCompleter
-
-
Method Details
-
complete
public CompletableFuture<? extends Collection<CompletionFragment>> complete(String command, int offset) -
runCompletion
public Collection<CompletionItem.Builder> runCompletion(ParsedDocument doc, Position pos, int offset) - Specified by:
runCompletion
in interfaceCompletionHandler
-
runCompletion
Part 1 of the V2 completion api; adapting our API to fit into existing CompletionHandler semantics. Right now we are just blindly re-parsing the whole document when using the old api, which is going to be good-enough-for-now; this may also allow us to borrow the existing unit tests to some degree.- Parameters:
doc
-offset
-- Returns:
-
sliceBefore
-
sortable
-
findAssignment
public List<ChunkerAssign> findAssignment(ParsedDocument doc, CompletionRequest request, String name) -
addMatch
@Deprecated public void addMatch(Collection<CompletionItem.Builder> results, Node node, String match, CompletionRequest index, String... nextTokens) Deprecated. -
getQuoteType
-
stringLiteral
-
getDefaultQuoteType
-
setDefaultQuoteType
-
getReferencedTables
-