PageRenderTime 43ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-1-pre5/bsh/commands/classBrowser.bsh

#
Unknown | 41 lines | 30 code | 11 blank | 0 comment | 0 complexity | b5d18a7cbb18775724f7bd2756645cb7 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. /**
  2. Open the class browser.
  3. */
  4. import bsh.util.ClassBrowser;
  5. void classBrowser() {
  6. inDesktop = ( bsh.system.desktop != void );
  7. browser = new ClassBrowser();
  8. browser.init();
  9. if ( inDesktop ) {
  10. frame = bsh.system.desktop.makeInternalFrame("BeanShell Class Browser");
  11. bsh.system.desktop.classbrowser = browser;
  12. } else
  13. frame = new javax.swing.JFrame("BeanShell Class Browser");
  14. // Ignore unhandled method invocations from listeners.
  15. invoke( method, args ) { }
  16. internalFrameClosing( e ) {
  17. // really need foo=void;...
  18. bsh.system.desktop.classbrowser = null;
  19. }
  20. if ( inDesktop )
  21. frame.addInternalFrameListener(this);
  22. browser.setFrame( frame );
  23. frame.getContentPane().add("Center", browser);
  24. frame.pack();
  25. if ( inDesktop )
  26. bsh.system.desktop.addInternalFrame(frame);
  27. frame.show();
  28. frame.toFront();
  29. return browser;
  30. }