Paul Kinnucan wrote:
> No problem. I'll modify the code to get the appropriate separator from 
> java.io.File class.

Yeah, I realised after I posted it that the
System.getProperty("path.separator") is probably what is wanted there.

>>2) It currently prints import statements for all matching classes -- you can
>>change that by inserting a break in the appropriate place.
> 
> This is a good idea. I'll modify the code so it returns a list of the
> matching classes.

? The current version does this.

> I'm a bit concerned about the performance hit if you include the JDK files.
> Anybody have an idea how many there are?

For me, without the jdk files I have less than 500 classes -- with the 1.2 jdk
classes it went up to around 4000.

> I wonder how much of a hit there would be if you did not build a database
> initially and simply searched the classpath every time.

That's what I did initially, but having the single database makes subsequent
searches _significantly_ faster. I agree with the original poster that the
classes that you need to actually import (rather than those in the package
being worked on) will not change often enough to warrant the performance hit.

Cheers,
        Len.
---
 Len Trigg =========== http://www.cs.waikato.ac.nz/~trigg/
 Computer Science Dept, University of Waikato, New Zealand
 PGP Public key http://www.cs.waikato.ac.nz/~trigg/key.asc

Reply via email to