@SneakyThrows(IOException.class) public CliWriter newLine() { reader.printNewline(); return this; }
private void printCommandHelp() throws IOException { _cr.printString( "The following commands are available:\n" + "\n" + " help - show this message\n" + " exit - exit this interpreter\n" + " quit - exit this interpreter\n" + " ls - lists all the local variables\n" + " clear - clears all local variables and functions\n" + " rm [var_name] - clears the given variable\n" ); _cr.printNewline(); }
private void printCommandHelp() throws IOException { _cr.printString( "The following commands are available:\n" + "\n" + " help - show this message\n" + " exit - exit this interpreter\n" + " quit - exit this interpreter\n" + " ls - lists all the local variables\n" + " clear - clears all local variables and functions\n" + " rm [var_name] - clears the given variable\n" ); _cr.printNewline(); }
ConsoleReader c = getConsoleReader(); c.beep(); c.printNewline(); c.printNewline(); c.printString("Warning!!! Your instance secret is still set to the default, this is not secure. We highly recommend you change it."); c.printNewline(); c.printNewline(); c.printNewline(); c.printString("You can change the instance secret in accumulo by using:"); c.printNewline(); c.printString(" bin/accumulo " + org.apache.accumulo.server.util.ChangeSecret.class.getName() + " oldPassword newPassword."); c.printNewline(); c.printString("You will also need to edit your secret in your configuration file by adding the property instance.secret to your conf/accumulo-site.xml. " + "Without this accumulo will not operate correctly"); c.printNewline();
public void showMessage(String message) throws PrompterException { try { consoleReader.printString(message); consoleReader.printNewline(); consoleReader.flushConsole(); } catch (IOException e) { throw new PrompterException("Failed to present prompt", e); } }
private static String readLine(ConsoleReader reader, String prompt) throws IOException { String earlierLine = reader.getCursorBuffer().toString(); String readLine = null; try { readLine = reader.readLine(prompt); } catch (IndexOutOfBoundsException e) { if (earlierLine.length() == 0) { reader.printNewline(); readLine = LINE_SEPARATOR; reader.getCursorBuffer().cursor = 0; } else { readLine = readLine(reader, prompt); } } return readLine; }
_cr.addCompletor( _completionHandler ); _cr.printString( "Type \"help\" to see available commands" ); _cr.printNewline(); _cr.printNewline(); StringWriter str = new StringWriter(); e.printStackTrace( new PrintWriter( str ) );
_cr.addCompletor( _completionHandler ); _cr.printString( "Type \"help\" to see available commands" ); _cr.printNewline(); _cr.printNewline(); StringWriter str = new StringWriter(); e.printStackTrace( new PrintWriter( str ) );
_cr.printNewline(); return true;
_cr.printNewline(); return true;
protected Object interactivelyEvaluate( String expr ) throws ParseResultsException, IOException { IGosuProgram gosuProgram = parseProgram( expr ); IProgramInstance instance = gosuProgram.getProgramInstance(); Object val = instance.evaluate( new ExternalSymbolMapSymbolTableWrapper( _interactiveSymbolTable, true ) ); processProgram( gosuProgram, instance ); IExpression expression = gosuProgram.getExpression(); boolean noReturnValue = expression == null || JavaTypes.pVOID().equals(expression.getType()) || expression instanceof INotAWordExpression; if (!noReturnValue && _logOutput ) { _cr.printString( OUTPUT_PREFIX + GosuShop.toString( val ) ); _cr.printNewline(); } return val; }
consoleReader.printNewline();
protected Object interactivelyEvaluate( String expr ) throws ParseResultsException, IOException { IGosuProgram gosuProgram = parseProgram( expr ); IProgramInstance instance = gosuProgram.getProgramInstance(); Object val = instance.evaluate( new ExternalSymbolMapSymbolTableWrapper( _interactiveSymbolTable, true ) ); processProgram( gosuProgram, instance ); IExpression expression = gosuProgram.getExpression(); boolean noReturnValue = expression == null || JavaTypes.pVOID().equals(expression.getType()) || expression instanceof INotAWordExpression; if (!noReturnValue && _logOutput ) { _cr.printString( OUTPUT_PREFIX + GosuShop.toString( val ) ); _cr.printNewline(); } return val; }
break; reader.printNewline(); return this;
consoleReader.printNewline();