At 03:04 PM 7/26/00 GMT, Max R. Andersen wrote:
>>>>>> "Paul" == Paul Kinnucan <[EMAIL PROTECTED]> writes:
>
> >>
> Ivana> Is something like this already available?
> >> As someone already mentioned JDE has some support for this,
> Paul> ^^^^^^^^^^^^
>
> Paul> Some support??!! The JDE's support is complete unlike the
> Paul> very limited ffap solution that you propose.
>
>Hey - sorry if I offended you! That was not the intention at all. And
>please remember that this "package" was created in about 30 minutes of
>tampering on the keyboard help the Ivan guy which was tired of
>requiring etags for doing this.
>
I'm not offended. I'm concerned that other JDE users not waste their time
on a half-baked solution to a problem for which a complete solution already
exists.
>And as he states - not much is needed to do this for normal
>java-operation. It is all a matter of searching directories for the
>names - that means it will work even without JDE and it also works
>beautifull together with JDE.
>
It "works" only in a very restricted set of circumstances. How easy
software development would be if you could simply tailor the problem to fit
your solution instead of the opposite.
> Paul> The
> Paul> jde-show-class-source command finds the source for any class
> Paul> that exists on the class path defined by the
> Paul> jde-global-classpath variable or CLASSPATH environment
> Paul> variable and whose source is in one of the paths specified
> Paul> by jde-db-source-directories, unlike your solution, which
> Paul> does not work for JDK API classes or jar libraries or
> Paul> projects where source files and class files are stored in
> Paul> separate directories.
>
>Did you see the TODO item about adding support for searching other
>directories thant the one mentioned in CLASSPATH ?
>
Yes, I did. It does not address the limitations of which I am speaking.
>And does JDE examine the JAR files for .java files and extract them to
>be shown ?
>
No, it does not extract source files from jar files. I am referring to the
fundamental flaw in any solution that depends on the classpath to find
source files, namely that the classpath specifies the locations of CLASSES
not SOURCE files on a user's system. It is not generally the case that
classes and their source files reside in the same location.
> >> but for me it is dreadfull as it seems to require the startup
> >> of the
> Paul> beanshell
> >> which is not always working correctly - so I have just put this
> >> solution together for you all to enjoy :)
> >>
>
> Paul> I have no problems with the Beanshell on any of the Windows
> Paul> platforms and occasionally have to issue the first command
> Paul> that requires the Beanshell twice on Solaris but this is
> Paul> minor.
>
> Paul> If you are having problems with the beanshell, please report
> Paul> them. A lot of JDE functionality, e.g., the wizards, depends
> Paul> on the Beanshell. Thus, if it is not working for you, you
> Paul> are missing out on key features of the JDE.
>
>Im using the features in BeanShell and I think it is great.
>But I have tried to set jde-db-source-directories
>
>But for finding source files my ffap-solution has the following
>advantages:
>
>+ Does not require JDE-mode (but who is not using this :)
>+ Is faster than BeanShell as it does not try to resolve the class name
After Beanshell startup, the time to resolve the class name is imperceptible.
>+ Does not require the java file to be compiled
How often do you need to find a file that has not been compiled?
>+ Beanshell does not (yet?) support automatically loading class'es
> which did not exist when it was invoked
The command jde-wiz-update-class-list loads classes that are compiled after
the Beanshell is invoked. It would be trivial to invoke this automatically
whenever a Java class is compiled.
>+ Less memoryintensive as is does not need to communicate
> with the beanshell (which can bring my Pentium 166Mhz, 64 meg. to
> its knees
>
>The negative sides is:
>
>- Does not resolve the class name (well - this is not needed in
> practice to find the source files)
>- Does not support multiple instances of the same class name (can be
> added if one wishes)
>- Does not search other paths than classpath (can easily be added if
> one wishes)
>
>
>So the bottom line is that this package makes ffap usable when
>developing java and it has advantages over JDE and vice versa.
>Primarily it is pure elisp and faster than using the beanshell and is
>usable for java files which is not compiled (or not compiled when
>beanshell was invoked.)
>
The only advantage I can see is that it does not require the Beanshell. I
personally cannot live without the Beanshell so the advantage is no
advantage to me. I have no objection to your posting your ffap-based
solution to the JDE mailing list as long as you are very clear about its
actual limitations and do not make incorrect or unfairly disparaging
statements about the capabilities of alternative solutions.
I also do not object in principal to offering an ffap-based solution as
part of the JDE. However, I will do so only if it offers at least the same
capabilities as the existing jde-show-class-source-command with the same
ease of use, that is, it must be capable of finding the source for any
unqualified class name at point that is listed in
jde-db-source-directories, which by the way is a list of package directories.
- Paul