Groovy - EDT Inspect and Kill All Inspection Windows


/ Published in: Groovy
Save to your folder(s)

see http://groovy.codehaus.org/gapi/groovy/inspect/swingui/ObjectBrowser.html


Copy this code and paste it in your HTML
  1. // gi(someObj); - groovy inspect obj
  2. def gi = { itObjToInspect ->
  3. javax.swing.SwingUtilities.invokeAndWait( {
  4. groovy.inspect.swingui.ObjectBrowser.inspect( itObjToInspect );
  5. } );
  6. }
  7.  
  8. // gik(); - kill all groovy inspect windows
  9. def gik = {
  10. java.awt.Frame.getFrames()
  11. .findAll { it.visible && it.title == 'Groovy Object Browser' }
  12. .each { itWin ->
  13. javax.swing.SwingUtilities.invokeAndWait({ itWin.visible = false; itWin.dispose(); });
  14. }
  15. }

URL: http://groovy.codehaus.org/gapi/groovy/inspect/swingui/ObjectBrowser.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.