public class CandidateListCompletionHandler extends java.lang.Object implements CompletionHandler
A CompletionHandler
that deals with multiple distinct completions
by outputting the complete list of possibilities to the console. This
mimics the behavior of the
readline
library.
Constructor and Description |
---|
CandidateListCompletionHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
complete(ConsoleReader reader,
java.util.List candidates,
int pos) |
static void |
printCandidates(ConsoleReader reader,
java.util.Collection candidates,
boolean eagerNewlines)
Print out the candidates.
|
void |
setAlwaysIncludeNewline(boolean eagerNewlines) |
static void |
setBuffer(ConsoleReader reader,
java.lang.String value,
int offset) |
public void setAlwaysIncludeNewline(boolean eagerNewlines)
public boolean complete(ConsoleReader reader, java.util.List candidates, int pos) throws java.io.IOException
complete
in interface CompletionHandler
java.io.IOException
public static void setBuffer(ConsoleReader reader, java.lang.String value, int offset) throws java.io.IOException
java.io.IOException
public static final void printCandidates(ConsoleReader reader, java.util.Collection candidates, boolean eagerNewlines) throws java.io.IOException
getAutoprintThreshhold
,
they prompt with aq warning.candidates
- the list of candidates to printjava.io.IOException