While you are there, how about...
If the source is not found but the .class file is, launch a decompiler
(customizable) on the .class and displaying its output. JAD works nicely
(http://www.geocities.com/SiliconValley/Bridge/8617/jad.html).
Phillip Lord
<[EMAIL PROTECTED] To: [EMAIL PROTECTED]
rc.ac.uk> cc: [EMAIL PROTECTED],
[EMAIL PROTECTED]
Subject: Re: CORRECTION: jtags and
classes
01/20/00
13:03
Please
respond to
plord
>>>>> "Larry" == Larry Riedel <[EMAIL PROTECTED]> writes:
Larry> I thought the idea of making a function similar to
Larry> "jde-help-class", which "for an unqualified class name,
Larry> [tests] for existence of the class in each package imported
Larry> into the current source file", such that "if the class exists
Larry> in more than one package, it lets you choose which one you
Larry> really want."
Larry> I thought it made sense that "the same functionality could be
Larry> extended to jumping to the source file that defines the
Larry> class."
Actually this is an interesting point. The jump to source
code which I wrote, based on a hack from the jde-help code, does
mostly this, which was very easy because all of the functionality was
there already. It was just a question of tying the different bits
together. However in this case the fully qualified class name is
resolved on the basis of what classes are loaded into the beanshell
JVM, wheras it would make a whole lot more sense to use the
information in the import statements. I guess if these failed then it
could fall back on JVM loaded classes.
Having a quick look through jde-complete, Ive noticed that
there is some parsing of import statements done in there, so some of
the work has already been done.
I think that I might have a go at implementing this sometime.
Most of the functions would be useful for something that I have wanted
to write for a long time which is an "import checker" which tests
whether a class has all of its required imports, and perhaps more
importantly that all of the imports declared in a class are actually
necessary...
Phil