/jEdit/tags/jedit-4-2-pre4/bsh/commands/classBrowser.bsh
Unknown | 48 lines | 38 code | 10 blank | 0 comment | 0 complexity | 23670d4c5f0bfbca9dd26ea0b2112031 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;
- classBrowser()
- {
- this.inDesktop = ( bsh.system.desktop != void );
- this.browser = new ClassBrowser( this.interpreter.getClassManager() );
- browser.init();
- if ( inDesktop ) {
- this.frame =
- bsh.system.desktop.makeInternalFrame("BeanShell Class Browser");
- frame.frameIcon = bsh.system.icons.eye;
- bsh.system.desktop.classbrowser = browser;
- } else {
- this.frame = new javax.swing.JFrame("BeanShell Class Browser");
- frame.iconImage=bsh.system.icons.eye.image;
- }
-
- // Ignore unhandled method invocations from listeners.
- invoke( name, args ) {
- if ( !name.startsWith("internalFrame") )
- throw new Error("method: "+name);
- }
- 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.selected=true;
- return browser;
- }