public JLineProcessor( boolean ansi, Shell shell, final ConsoleReader reader, PrintStream out, String lineSeparator) { // this.console = new Console(shell, this); this.writer = out; this.useAlternate = false; this.terminal = reader.getTerminal(); this.reader = reader; this.lineSeparator = lineSeparator; this.done = new CountDownLatch(1); this.ansi = ansi; // Update the mode according to the notification console.addModeListener(new Runnable() { @Override public void run() { reader.setKeyMap(console.getMode().getKeyMap()); } }); }
@Override protected void setUp() throws Exception { prompt = ""; console = new Console( shell = new SyncShell() { @Override public String getPrompt() { return prompt; } }, driver = new TestDriver()); }
public JLineProcessor( boolean ansi, Shell shell, final ConsoleReader reader, PrintStream out, String lineSeparator) { // this.console = new Console(shell, this); this.writer = out; this.useAlternate = false; this.terminal = reader.getTerminal(); this.reader = reader; this.lineSeparator = lineSeparator; this.done = new CountDownLatch(1); this.ansi = ansi; // Update the mode according to the notification console.addModeListener(new Runnable() { @Override public void run() { reader.setKeyMap(console.getMode().getKeyMap()); } }); }
public JLineProcessor( boolean ansi, Shell shell, final ConsoleReader reader, PrintStream out, String lineSeparator) { // this.console = new Console(shell, this); this.writer = out; this.useAlternate = false; this.terminal = reader.getTerminal(); this.reader = reader; this.lineSeparator = lineSeparator; this.done = new CountDownLatch(1); this.ansi = ansi; // Update the mode according to the notification console.addModeListener(new Runnable() { @Override public void run() { reader.setKeyMap(console.getMode().getKeyMap()); } }); }