Package jline
Class CandidateListCompletionHandler
- java.lang.Object
-
- jline.CandidateListCompletionHandler
-
- All Implemented Interfaces:
CompletionHandler
public class CandidateListCompletionHandler extends java.lang.Object implements CompletionHandler
A
TODO:CompletionHandlerthat deals with multiple distinct completions by outputting the complete list of possibilities to the console. This mimics the behavior of the readline library.- handle quotes and escaped quotes
- enable automatic escaping of whitespace
- Author:
- Marc Prud'hommeaux
-
-
Constructor Summary
Constructors Constructor Description CandidateListCompletionHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancomplete(ConsoleReader reader, java.util.List candidates, int pos)static voidprintCandidates(ConsoleReader reader, java.util.Collection candidates, boolean eagerNewlines)Print out the candidates.voidsetAlwaysIncludeNewline(boolean eagerNewlines)static voidsetBuffer(ConsoleReader reader, java.lang.String value, int offset)
-
-
-
Constructor Detail
-
CandidateListCompletionHandler
public CandidateListCompletionHandler()
-
-
Method Detail
-
setAlwaysIncludeNewline
public void setAlwaysIncludeNewline(boolean eagerNewlines)
-
complete
public boolean complete(ConsoleReader reader, java.util.List candidates, int pos) throws java.io.IOException
- Specified by:
completein interfaceCompletionHandler- Throws:
java.io.IOException
-
setBuffer
public static void setBuffer(ConsoleReader reader, java.lang.String value, int offset) throws java.io.IOException
- Throws:
java.io.IOException
-
printCandidates
public static final void printCandidates(ConsoleReader reader, java.util.Collection candidates, boolean eagerNewlines) throws java.io.IOException
Print out the candidates. If the size of the candidates is greated than thegetAutoprintThreshhold, they prompt with aq warning.- Parameters:
candidates- the list of candidates to print- Throws:
java.io.IOException
-
-