Groovy 2.2.1

org.codehaus.groovy.tools.shell.completion
[Groovy] Class GroovySyntaxCompletor

java.lang.Object
  org.codehaus.groovy.tools.shell.completion.GroovySyntaxCompletor
All Implemented Interfaces:
Completer

class GroovySyntaxCompletor

Implements the Completor interface to provide competions for GroovyShell by tokenizing the buffer and invoking other classes depending on the tokens found.

Authors:
Marty Saxton


Nested Class Summary
static enum GroovySyntaxCompletor.CompletionCase

static class GroovySyntaxCompletor.InStringException

 
Field Summary
protected String[] classes

protected static Logger log

 
Constructor Summary
GroovySyntaxCompletor(Groovysh shell, ReflectionCompletor reflectionCompletor, List identifierCompletors, Completer filenameCompletor)

 
Method Summary
int complete(String bufferLine, int cursor, List candidates)

int completeIdentifier(List tokens, List candidates)

static org.codehaus.groovy.antlr.parser.GroovyLexer createGroovyLexer(String src)

static GroovySyntaxCompletor.CompletionCase getCompletionCase(List tokens)

static boolean isCommand(String bufferLine, CommandRegistry registry)

static boolean tokenizeBuffer(String bufferLine, List previousLines, List result)

Adds to result the identified tokens for the bufferLines

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

classes

protected String[] classes


log

protected static final Logger log


 
Constructor Detail

GroovySyntaxCompletor

GroovySyntaxCompletor(Groovysh shell, ReflectionCompletor reflectionCompletor, List identifierCompletors, Completer filenameCompletor)


 
Method Detail

complete

int complete(String bufferLine, int cursor, List candidates)


completeIdentifier

int completeIdentifier(List tokens, List candidates)


createGroovyLexer

static org.codehaus.groovy.antlr.parser.GroovyLexer createGroovyLexer(String src)


getCompletionCase

static GroovySyntaxCompletor.CompletionCase getCompletionCase(List tokens)


isCommand

static boolean isCommand(String bufferLine, CommandRegistry registry)


tokenizeBuffer

static boolean tokenizeBuffer(String bufferLine, List previousLines, List result)
Adds to result the identified tokens for the bufferLines
Parameters:
bufferLine
previousLines
result
Returns:
true if lexing was successfull


 

Copyright © 2003-2013 The Codehaus. All rights reserved.