/** * Restore the terminal. */ protected void restoreTerminal() { try { terminal.restore(); } catch (Exception e) { // ignore } if (terminal instanceof UnixTerminal) { // workaround for GRAILS-11494 try { new TerminalLineSettings().set("sane"); } catch (Exception e) { // ignore } } }
public void restore() throws Exception { terminal.restore(); }
@Override public void restore() throws Exception { base.restore(); }
@Override public void run() { try { term.restore(); } catch (Exception ignore) { } } });
public void restore() throws Exception { terminal.restore(); }
@Override public void run() { try { console.getTerminal().restore(); } catch (final Exception ignored) { } }
public void destroy() { try { console.getTerminal().restore(); } catch (Throwable e) { // Ignore } executor.shutdown(); }
private static void quit(ConsoleReader reader) throws Exception { reader.getTerminal().restore(); System.out.println("Bye."); System.exit(0); }
@Override public void run() { try { console.getTerminal().restore(); } catch (final Exception ignored) { } }
protected void restoreTerminal() { try { terminal.restore(); } catch (Exception e) { // ignore } if(terminal instanceof UnixTerminal) { // workaround for GRAILS-11494 try { new TerminalLineSettings().set("sane"); } catch (Exception e) { // ignore } } }
proc1.waitFor(); terminated.set(true); TerminalFactory.get().restore(); String application = directory + File.separator + "concourse-server"; // the install directory for the
term.restore(); term.init();
public static void main(String[] args) { System.out.println("Tigon Distributed Client"); if (args.length > 0) { if ("--help".equals(args[0]) || "-h".equals(args[0])) { usage(false); return; } if (args.length < 2) { usage(true); } String zkQuorumString = args[0]; String rootNamespace = args[1]; DistributedMain main = null; try { main = createDistributedMain(zkQuorumString, rootNamespace); main.startUp(System.out); } catch (Exception e) { LOG.error(e.getMessage(), e); } finally { try { if (main != null) { main.shutDown(); } TerminalFactory.get().restore(); } catch (Exception e) { LOG.warn(e.getMessage(), e); } } } }
public void run() { try { if (reader.getHistory() instanceof FileHistory) { ((FileHistory) reader.getHistory()).flush(); } reader.getTerminal().restore(); } catch (Exception e) { // do nothing } } });
} finally { try{ TerminalFactory.get().restore(); } catch(Exception e) { logger.warn("problem closing console", e);
} finally { try{ TerminalFactory.get().restore(); } catch(Exception e) { logger.warn("problem closing console", e);
} finally { try { TerminalFactory.get().restore(); } catch (Exception e) { e.printStackTrace();
/** * Hides the editor screen and restore the {@link Terminal}. */ public void hide() { console.out().print("\33[" + 1 + ";" + terminal.getHeight() + ";r"); //Erase screen doesn't behave well on windows. for (int l = 1; l <= terminal.getHeight(); l++) { console.out().print(ansi().cursor(l, 1)); console.out().print(ansi().eraseLine(Erase.FORWARD)); } console.out().print(ansi().cursor(1, 1)); flush(); try { terminal.restore(); } catch (Exception e) { //noop } }
public void run() throws Exception { reader.getTerminal().init(); printGreeting(); try { while(readExpression()) { } // run finalizers and shutdown session.close(); } finally { reader.getTerminal().restore(); } }
} finally { try { TerminalFactory.get().restore(); } catch (Exception e) { e.printStackTrace();