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
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionChunkerCompleter(Logger log, QueryScope variables) ChunkerCompleter(Logger log, QueryScope variables, CompletionLookups lookups) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMatch(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) voidsetDefaultQuoteType(String defaultQuoteType) sliceBefore(CompletionItem.Builder item, Position requested, Node node) static Stringsortable(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:
runCompletionin 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
-