public interface CodeCompletion
Completor interface but
is defined separately so that we don't introduce a dependency on
jline where it doesn't make sense.| Modifier and Type | Method and Description |
|---|---|
int |
complete(PrintWriter output,
String context,
int cursorPosition,
List candidates)
Generates the completion candidates and fills the supplied list with them.
|
void |
setMetadataProvider(MetadataProvider metadataProvider)
Provides the code completion implementation with the metadata provider it can use to
format more meaningful completion hints.
|
void |
setScriptContext(ScriptContext scriptContext)
The code completor can use the provided script context to find out about possible
completions.
|
void setScriptContext(ScriptContext scriptContext)
This method is called once before the first complete(PrintWriter, String, int, List) method
is called.
scriptContext - void setMetadataProvider(MetadataProvider metadataProvider)
metadataProvider - int complete(PrintWriter output, String context, int cursorPosition, List candidates)
output - the output the completor can use to write some additional information to convey some
additional info to the usercontext - the context of the code completion, usually that is the current
statement being edited by the usercursorPosition - the position of the cursor inside the contextcompletions - this should be a list of strings but is intentionally left raw
so that this interface is compatible with jline's Completor.Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.