public void cancel() { ClassLoader previous = crash.setCRaSHLoader(); try { Thread t = thread; if (t != null) { t.interrupt(); } cancelled = true; } finally { crash.setPreviousLoader(previous); } } }
/** * For now basic implementation */ public CompletionMatch complete(final String prefix) { ClassLoader previous = setCRaSHLoader(); try { return repl.complete(this, prefix); } finally { setPreviousLoader(previous); } }
public void close() { ClassLoader previous = setCRaSHLoader(); try { for (Language manager : crash.langs) { manager.destroy(this); } } finally { setPreviousLoader(previous); } }
public String getWelcome() { ClassLoader previous = setCRaSHLoader(); try { Compiler groovy = crash.scriptResolver.getCompiler("groovy"); if (groovy != null) { return groovy.doCallBack(this, "welcome", ""); } else { return ""; } } finally { setPreviousLoader(previous); } }
public String getPrompt() { ClassLoader previous = setCRaSHLoader(); try { Compiler groovy = crash.scriptResolver.getCompiler("groovy"); if (groovy != null) { return groovy.doCallBack(this, "prompt", "% "); } else { return "% "; } } finally { setPreviousLoader(previous); } }
CRaSHSession(final CRaSH crash, Principal user) { // Set variable available to all scripts put("crash", crash); // this.crash = crash; this.user = user; // ClassLoader previous = setCRaSHLoader(); try { for (Language manager : crash.langs) { manager.init(this); } } finally { setPreviousLoader(previous); } }
public void execute(ShellProcessContext processContext) { ClassLoader previous = crash.setCRaSHLoader(); try { ShellResponse resp;
public void cancel() { ClassLoader previous = crash.setCRaSHLoader(); try { Thread t = thread; if (t != null) { t.interrupt(); } cancelled = true; } finally { crash.setPreviousLoader(previous); } } }
public void cancel() { ClassLoader previous = crash.setCRaSHLoader(); try { Thread t = thread; if (t != null) { t.interrupt(); } cancelled = true; } finally { crash.setPreviousLoader(previous); } } }
public void cancel() { ClassLoader previous = crash.setCRaSHLoader(); try { Thread t = thread; if (t != null) { t.interrupt(); } cancelled = true; } finally { crash.setPreviousLoader(previous); } } }
public void close() { ClassLoader previous = setCRaSHLoader(); try { for (Language manager : crash.langs) { manager.destroy(this); } } finally { setPreviousLoader(previous); } }
public void close() { ClassLoader previous = setCRaSHLoader(); try { for (Language manager : crash.langs) { manager.destroy(this); } } finally { setPreviousLoader(previous); } }
/** * For now basic implementation */ public CompletionMatch complete(final String prefix) { ClassLoader previous = setCRaSHLoader(); try { return repl.complete(this, prefix); } finally { setPreviousLoader(previous); } }
/** * For now basic implementation */ public CompletionMatch complete(final String prefix) { ClassLoader previous = setCRaSHLoader(); try { return repl.complete(this, prefix); } finally { setPreviousLoader(previous); } }
public String getWelcome() { ClassLoader previous = setCRaSHLoader(); try { Compiler groovy = crash.scriptResolver.getCompiler("groovy"); if (groovy != null) { return groovy.doCallBack(this, "welcome", ""); } else { return ""; } } finally { setPreviousLoader(previous); } }
public String getPrompt() { ClassLoader previous = setCRaSHLoader(); try { Compiler groovy = crash.scriptResolver.getCompiler("groovy"); if (groovy != null) { return groovy.doCallBack(this, "prompt", "% "); } else { return "% "; } } finally { setPreviousLoader(previous); } }
public String getPrompt() { ClassLoader previous = setCRaSHLoader(); try { Compiler groovy = crash.scriptResolver.getCompiler("groovy"); if (groovy != null) { return groovy.doCallBack(this, "prompt", "% "); } else { return "% "; } } finally { setPreviousLoader(previous); } }
public String getWelcome() { ClassLoader previous = setCRaSHLoader(); try { Compiler groovy = crash.scriptResolver.getCompiler("groovy"); if (groovy != null) { return groovy.doCallBack(this, "welcome", ""); } else { return ""; } } finally { setPreviousLoader(previous); } }
CRaSHSession(final CRaSH crash, Principal user, AuthInfo authInfo) { // Set variable available to all scripts put("crash", crash); // this.crash = crash; this.user = user; this.authInfo = authInfo; // ClassLoader previous = setCRaSHLoader(); try { for (Language manager : crash.langs) { manager.init(this); } } finally { setPreviousLoader(previous); } }
public void close() { ClassLoader previous = setCRaSHLoader(); try { GroovyScript logout = getLifeCycle("logout"); if (logout != null) { logout.setContext(this); logout.run(); } } catch (NoSuchCommandException e) { e.printStackTrace(); } finally { setPreviousLoader(previous); } }