/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
- /**
- Open the class browser.
- */
- import bsh.util.ClassBrowser;
- void classBrowser() {
- inDesktop = ( bsh.system.desktop != void );
- browser = new ClassBrowser();
- browser.init();
- if ( inDesktop ) {
- frame = bsh.system.desktop.makeInternalFrame("BeanShell Class Browser");
- bsh.system.desktop.classbrowser = browser;
- } else
- frame = new javax.swing.JFrame("BeanShell Class Browser");
- // Ignore unhandled method invocations from listeners.
- invoke( method, args ) { }
- internalFrameClosing( e ) {
- // really need foo=void;...
- bsh.system.desktop.classbrowser = null;
- }
- if ( inDesktop )
- frame.addInternalFrameListener(this);
- browser.setFrame( frame );
- frame.getContentPane().add("Center", browser);
- frame.pack();
- if ( inDesktop )
- bsh.system.desktop.addInternalFrame(frame);
- frame.show();
- frame.toFront();
- return browser;
- }