PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms 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
 1/**
 2	Open the class browser.
 3*/
 4import bsh.util.ClassBrowser;
 5
 6void classBrowser() {
 7	inDesktop = ( bsh.system.desktop != void );
 8
 9	browser = new ClassBrowser();
10	browser.init();
11
12	if ( inDesktop ) {
13		frame = bsh.system.desktop.makeInternalFrame("BeanShell Class Browser");
14		bsh.system.desktop.classbrowser = browser;
15	} else
16		frame = new javax.swing.JFrame("BeanShell Class Browser");
17
18	// Ignore unhandled method invocations from listeners.
19	invoke( method, args ) { }
20
21	internalFrameClosing( e ) {
22		// really need foo=void;...  
23		bsh.system.desktop.classbrowser = null;
24	}
25
26	if ( inDesktop )
27		frame.addInternalFrameListener(this);
28
29	browser.setFrame( frame );
30	frame.getContentPane().add("Center", browser);
31	frame.pack();
32
33	if ( inDesktop )
34		bsh.system.desktop.addInternalFrame(frame);
35
36	frame.show();
37	frame.toFront();
38
39	return browser;
40}
41