executor = createExecutor(commandLine, console, props, autoCompleter); loadVariables(commandLine, executor); console.setPrompt(new Prompt(EXPRESSION_PROMPT)); console.addCompletion(this); console.setConsoleCallback(this);
newAction.addActionListener((ActionEvent e) -> { Prompt nf = new Prompt("Add a new function","f(x)="); nf.createPrompt(); System.out.println(nf.getOutput()); });
.settings(settings) .commandRegistry(registry) .prompt(new Prompt(""))
.settings(settings) .commandRegistry(registry) .prompt(new Prompt("")) .create();
ConsoleBuffer consoleBuffer = new AeshConsoleBufferBuilder() .shell(invocation.getShell()) .prompt(new Prompt(prompt, maskChar)) .create(); InputProcessor inputProcessor = new AeshInputProcessorBuilder()
ConsoleBuffer consoleBuffer = new AeshConsoleBufferBuilder() .shell(invocation.getShell()) .prompt(new Prompt(prompt, maskChar)) .create(); InputProcessor inputProcessor = new AeshInputProcessorBuilder()
console.setPrompt(new Prompt(prompt)); console.setConsoleCallback(new AeshConsoleCallback() { @Override
try (Shell scriptShell = shellFactory.createShell(currentResource, settings)) scriptShell.getConsole().setPrompt(new Prompt("")); try (BufferedReader lineReader = new BufferedReader(reader))
protected String promptForInput(String prompt, Character mask, CommandInvocation invocation) throws IOException, InterruptedException { ConsoleBuffer consoleBuffer = new AeshConsoleBufferBuilder() .shell(invocation.getShell()) .prompt(new Prompt(prompt, mask)) .create(); InputProcessor inputProcessor = new AeshInputProcessorBuilder() .consoleBuffer(consoleBuffer) .create(); consoleBuffer.displayPrompt(); String result; do { result = inputProcessor.parseOperation(invocation.getInput()); } while(result == null ); return result; }
console.getShell().out().println("**********************************************************************"); console.setPrompt(new Prompt("artificer> ")); console.start();