()
| 270 | } |
| 271 | |
| 272 | public void init() throws ClassPathException |
| 273 | { |
| 274 | // Currently we have to cast because BshClassPath is not known by |
| 275 | // the core. |
| 276 | classPath = ((ClassManagerImpl)classManager).getClassPath(); |
| 277 | |
| 278 | // maybe add MappingFeedbackListener here... or let desktop if it has |
| 279 | /* |
| 280 | classPath.insureInitialized( null |
| 281 | // get feedback on mapping... |
| 282 | new ConsoleInterface() { |
| 283 | public Reader getIn() { return null; } |
| 284 | public PrintStream getOut() { return System.out; } |
| 285 | public PrintStream getErr() { return System.err; } |
| 286 | public void println( String s ) { System.out.println(s); } |
| 287 | public void print( String s ) { System.out.print(s); } |
| 288 | public void print( String s, Color color ) { print( s ); } |
| 289 | public void error( String s ) { print( s ); } |
| 290 | } |
| 291 | ); |
| 292 | */ |
| 293 | |
| 294 | classPath.addListener( this ); |
| 295 | |
| 296 | Set pset = classPath.getPackagesSet(); |
| 297 | |
| 298 | ptree = new PackageTree( pset ); |
| 299 | ptree.addTreeSelectionListener( new TreeSelectionListener() { |
| 300 | public void valueChanged(TreeSelectionEvent e) { |
| 301 | TreePath tp = e.getPath(); |
| 302 | Object [] oa = tp.getPath(); |
| 303 | StringBuilder selectedPackage = new StringBuilder(); |
| 304 | for(int i=1; i<oa.length; i++) { |
| 305 | selectedPackage.append( oa[i].toString() ); |
| 306 | if ( i+1 < oa.length ) |
| 307 | selectedPackage.append("."); |
| 308 | } |
| 309 | setClist( selectedPackage.toString() ); |
| 310 | } |
| 311 | } ); |
| 312 | |
| 313 | classlist=new JList(); |
| 314 | classlist.setBackground(LIGHT_BLUE); |
| 315 | classlist.addListSelectionListener(this); |
| 316 | |
| 317 | conslist = new JList(); |
| 318 | conslist.addListSelectionListener(this); |
| 319 | |
| 320 | mlist = new JList(); |
| 321 | mlist.setBackground(LIGHT_BLUE); |
| 322 | mlist.addListSelectionListener(this); |
| 323 | |
| 324 | fieldlist = new JList(); |
| 325 | fieldlist.addListSelectionListener(this); |
| 326 | |
| 327 | JSplitPane methodConsPane = splitPane( |
| 328 | JSplitPane.VERTICAL_SPLIT, true, |
| 329 | labeledPane(new JScrollPane(conslist), "Constructors"), |
no test coverage detected