Skip to content

Instantly share code, notes, and snippets.

@michalbcz
Created October 19, 2012 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save michalbcz/3916997 to your computer and use it in GitHub Desktop.
Save michalbcz/3916997 to your computer and use it in GitHub Desktop.
groovy - run console inside of some context (embedding groovy's gui console)
def c = new groovy.ui.Console(getClass().getClassLoader(), new Binding())
c.setVariable("ctx",this)
c.run()
def done = false
c.frame.windowClosing = {done = true}
c.frame.windowClosed = {done = true}
while (!done) {
sleep(1000)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment