public void provide(Object element) throws Exception { outter.provide(element); }
public int getHeight() { return ctx.getHeight(); }
public int getWidth() { return outter.getWidth(); }
CRaSH crash = (CRaSH)context.getSession().get("crash"); for (Map.Entry<String, String> command : crash.getCommands()) { try { context.provide(new LabelElement("Try one of these commands with the -h or --help switch:\n")); context.provide(table);
public RenderPrintWriter getWriter() { return outter.getWriter(); }
public Map<String, Object> getAttributes() { return outter.getAttributes(); } }
public String getProperty(String propertyName) { return ctx.getProperty(propertyName); }
public String readLine(String msg, boolean echo) throws IOException, InterruptedException { return outter.readLine(msg, echo); }
/** * Flush pipe. * * @throws IOException any io exception */ public void flush() throws IOException { context.flush(); }
/** * Close pipe. * * @throws Exception any exception */ public void close() throws Exception { context.close(); } }
public Map<String, Object> getSession() { return outter.getSession(); }
@Usage("the optional repl name") String name) throws Exception { ShellSession session = (ShellSession)context.getSession(); Repl current = session.getRepl(); if (name != null) { if (name.equals(current.getLanguage().getName())) { context.provide("Using repl " + name); } else { Repl found = null; context.provide("Using repl " + name); } else { throw new ScriptException("Repl " + name + " not found"); context.provide(new LabelElement("Current repl is " + current.getLanguage().getName() + "available repl are:\n")); context.provide(table);
public RenderPrintWriter getWriter() { return ctx.getWriter(); }
public Map<String, Object> getAttributes() { return ctx.getAttributes(); }
public String getProperty(String propertyName) { return outter.getProperty(propertyName); }
public String readLine(String msg, boolean echo) throws IOException, InterruptedException { if (current == null) { throw new IllegalStateException("Not under context"); } else { return current.readLine(msg, echo); } } public int getWidth() {
public void flush() throws IOException { context.flush(); }
public void close() throws Exception { if (current == null) { throw new IllegalStateException("Not under context"); } else { current.close(); } } public boolean takeAlternateBuffer() throws IOException {
public Map<String, Object> getSession() { return ctx.getSession(); }