jline

Class CandidateListCompletionHandler

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.

TODO:

Author: Marc Prud'hommeaux

Method Summary
booleancomplete(ConsoleReader reader, List candidates, int pos)
static voidprintCandidates(ConsoleReader reader, Collection candidates, boolean eagerNewlines)
Print out the candidates.
voidsetAlwaysIncludeNewline(boolean eagerNewlines)
static voidsetBuffer(ConsoleReader reader, String value, int offset)

Method Detail

complete

public boolean complete(ConsoleReader reader, List candidates, int pos)

printCandidates

public static final void printCandidates(ConsoleReader reader, Collection candidates, boolean eagerNewlines)
Print out the candidates. If the size of the candidates is greated than the getAutoprintThreshhold, they prompt with aq warning.

Parameters: candidates the list of candidates to print

setAlwaysIncludeNewline

public void setAlwaysIncludeNewline(boolean eagerNewlines)

setBuffer

public static void setBuffer(ConsoleReader reader, String value, int offset)
Copyright © 2002-2010 null. All Rights Reserved.