jline.console.completer
Class CandidateListCompletionHandler
java.lang.Object
jline.console.completer.CandidateListCompletionHandler
- All Implemented Interfaces:
- CompletionHandler
public class CandidateListCompletionHandler
- extends 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.
- Since:
- 2.3
- Author:
- Marc Prud'hommeaux, Jason Dillon
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CandidateListCompletionHandler
public CandidateListCompletionHandler()
complete
public boolean complete(ConsoleReader reader,
List<CharSequence> candidates,
int pos)
throws IOException
- Specified by:
complete
in interface CompletionHandler
- Throws:
IOException
setBuffer
public static void setBuffer(ConsoleReader reader,
CharSequence value,
int offset)
throws IOException
- Throws:
IOException
printCandidates
public static void printCandidates(ConsoleReader reader,
Collection<CharSequence> candidates)
throws IOException
- Print out the candidates. If the size of the candidates is greater than the
ConsoleReader.getAutoprintThreshold()
, they prompt with a warning.
- Parameters:
candidates
- the list of candidates to print
- Throws:
IOException
Copyright © 2008-2011 Sonatype. All Rights Reserved.