Search in sources :

Example 1 with LineReaderBuilder

use of org.jline.reader.LineReaderBuilder in project sponge by softelnet.

the class JLineInteractiveModeConsole method open.

@Override
public void open() {
    parser = createParser();
    try {
        terminal = (terminalBuilder != null ? terminalBuilder : TerminalBuilder.builder()).build();
    } catch (IOException e) {
        throw SpongeUtils.wrapException(e);
    }
    LineReaderBuilder lineReaderBuilder = LineReaderBuilder.builder().appName(VersionInfo.PRODUCT).terminal(terminal).parser(parser);
    if (completer != null) {
        lineReaderBuilder.completer(completer);
    }
    reader = lineReaderBuilder.build();
}
Also used : LineReaderBuilder(org.jline.reader.LineReaderBuilder) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 LineReaderBuilder (org.jline.reader.LineReaderBuilder)1