@Override public Screenable cls() throws IOException { console.driver.cls(); return this; }
@Override void perform(Editor editor, EditorBuffer buffer) throws IOException { editor.console.driver.cls(); StringBuilder sb = new StringBuilder(); int index = 0; List<String> lines = buffer.getLines(); for (String line : lines) { if (index == 0) { String prompt = editor.console.shell.getPrompt(); sb.append(prompt == null ? "" : prompt); } else { sb.append("\n> "); } sb.append(line); index++; } editor.console.driver.write(sb.toString()); editor.console.driver.flush(); } };
@Override public Screenable cls() throws IOException { console.driver.cls(); return this; }
@Override public Screenable cls() throws IOException { console.driver.cls(); return this; }
@Override void perform(Editor editor, EditorBuffer buffer) throws IOException { editor.console.driver.cls(); StringBuilder sb = new StringBuilder(); int index = 0; List<String> lines = buffer.getLines(); for (String line : lines) { if (index == 0) { String prompt = editor.console.shell.getPrompt(); sb.append(prompt == null ? "" : prompt); } else { sb.append("\n> "); } sb.append(line); index++; } editor.console.driver.write(sb.toString()); editor.console.driver.flush(); } };
@Override void perform(Editor editor, EditorBuffer buffer) throws IOException { editor.console.driver.cls(); StringBuilder sb = new StringBuilder(); int index = 0; List<String> lines = buffer.getLines(); for (String line : lines) { if (index == 0) { String prompt = editor.console.shell.getPrompt(); sb.append(prompt == null ? "" : prompt); } else { sb.append("\n> "); } sb.append(line); index++; } editor.console.driver.write(sb.toString()); editor.console.driver.flush(); } };