Skip to content

Instantly share code, notes, and snippets.

@michalbcz
Created October 19, 2012 08:42
Show Gist options
  • 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