[Groovy] Class GroovySyntaxCompletor
- org.codehaus.groovy.tools.shell.completion.GroovySyntaxCompletor
- All Implemented Interfaces and Traits:
- Completer
@Deprecated class GroovySyntaxCompletor extends Object implements Completer
Implements the Completor interface to provide competions for GroovyShell by tokenizing the buffer and invoking other classes depending on the tokens found.
Nested Class Summary
Modifiers | Name | Description |
---|---|---|
static enum | GroovySyntaxCompletor.CompletionCase | |
static class | GroovySyntaxCompletor.InStringException |
Field Summary
Modifiers | Name | Description |
---|---|---|
protected static Logger | LOG |
Constructor Summary
Constructor and description |
---|
GroovySyntaxCompletor
(Groovysh shell, ReflectionCompletor reflectionCompletor, IdentifierCompletor classnameCompletor, List<IdentifierCompletor> identifierCompletors, Completer filenameCompletor) |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
int |
complete(String bufferLine, int cursor, List<CharSequence> candidates) | |
int |
completeIdentifier(List<GroovySourceToken> tokens, List<CharSequence> candidates) | |
static GroovyLexer |
createGroovyLexer(String src) | |
static GroovySyntaxCompleter.CompletionCase |
getCompletionCase(List<GroovySourceToken> tokens) | |
static boolean |
isCommand(String bufferLine, CommandRegistry registry) | |
static boolean |
tokenizeBuffer(String bufferLine, List<String> previousLines, List<GroovySourceToken> result) Adds to result the identified tokens for the bufferLines |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class Object | wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail
protected static final Logger LOG
Constructor Detail
GroovySyntaxCompletor(Groovysh shell, ReflectionCompletor reflectionCompletor, IdentifierCompletor classnameCompletor, List<IdentifierCompletor> identifierCompletors, Completer filenameCompletor)
Method Detail
@Override int complete(String bufferLine, int cursor, List<CharSequence> candidates)
int completeIdentifier(List<GroovySourceToken> tokens, List<CharSequence> candidates)
static GroovyLexer createGroovyLexer(String src)
static GroovySyntaxCompleter.CompletionCase getCompletionCase(List<GroovySourceToken> tokens)
static boolean isCommand(String bufferLine, CommandRegistry registry)
static boolean tokenizeBuffer(String bufferLine, List<String> previousLines, List<GroovySourceToken> result)
Adds to result the identified tokens for the bufferLines
- Parameters:
- bufferLine
- previousLines
- result
- Returns:
- true if lexing was successful
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/org/codehaus/groovy/tools/shell/completion/GroovySyntaxCompletor.html