First off, my apologies for the previous message, I didn't look at the
date I was replying to.
Anyway, when I was browsing some java code today via JDE I noticed that
getting API information is a real pain. So, in a few minutes I hacked
together a couple of tools. These tools are truly hacks, based on high
level integration, so they're not prime time material.
The first, M-x jguess, guesses expansions for a class name.
For example, when you see Vector v, you can select Vector and it will
expand to java.lang.Vector (via a pipe from a java utility). It's not
automatic and I don't know how to make it as such.
Jguess is based on another posted java import tool.
Then, I hacked a little tool called M-x jhelp... you select
java.lang.Vector and it w3 browses in a buffer to the relevant page in the
API. (based on URL concatenation, nothing fancy)
Of course, it could work for "Vector" alone with a little modification,
and delay...
What I'd like to do is keep all these docs locally as text (since there is
absolutely no useful graphics involved) that way it will be really fast,
as w3 rendering slows me down.
Also, it needs to open in a new frame for convenience.
If it's not obvious, I'm new at java and reading code is arduous without
quick conext-sensitive documentation.
Next, I've noticed everyone in this newsgroup really needs method lists.
I do too. I realize Paul has some other projects to work on, and I
appreciate the work he's doing. I've got a few things in mind for this
right now...
First, ever noticed that M-/ cycles through completions? This is an
acceptable way to handle it as opposed to a popup window. A hack for this
sort of behavior I can see happening this way:
First time you try to complete, an external tool rummages through the
CLASSPATH api. It could just be a list like:
("java.util.Vector" "java.util.List" ...)
completion would be minimal for data types, in otherwords
jav<complete> -> java
java.u <complete> -> java.util
java.util.V <complete> -> java.util.Vector
That's probably not tough to manage.
Then you have the variable properties which are a different matter... Of
course, this requires meaningful interpretation of the current buffer. To
speed things up we could require that users declare variables like this:
String s;
instead of
String
s;
Which is technically legal. Then, all we have to do is search for all
lines in the current scope that match this tokenization:
<data type> <variable>;
Since finding the current scope might require effort (ugghh effort) in a
file in edit, a good approximation is nearest declaration of the variable
of that name...
Alternatively we could use environmental frames
{
<open frame x>
}
<close frame x>
At any rate, what this rambling is supposed to accomplish is that it may
not be a big project to hack together a completion sequence until the
professional version is completed.
Email me if you want to collaborate.
-Bill