Extracting JavaDoc Comment Fast?
Hi,
I would like to be able to display JavaDoc comments (including tags, parameters etc) as GUI tooltips. javadoc seems doesn't have this ability other than each and everytime that I run this program, save the result to a file and load it back to memory. Unfortunately, speed is quite important. Any better ways of doing so?
Thanks.
Sun once batted around the idea of dynamically generating on-the-fly, just-in-time on-the-fly docs. Javadoc would have a small web server that would receive http requests from a user for a class (or member), it would run javadoc on the source and return that generated web page to the browser, all without writing to disk. It would be quite fast, because javadoc spends most of its time writing to disk. We wouldn't have to ship
bulky HTML files -- let the source be the true source.
We never did implement it, though, given priorities. You would have to go into the source code and change the way javadoc writes to a stream to redirect it. So it is feasible, but would be some work -- javadoc has no option for redirecting its output.
So what kind of page would display Javadoc comments as tooltips? Some developer docs?
Well, for an GUI application (like Eclipse), hover the mouse over a function call and you can see its javadoc instantly.
What I need is quite similar. I need to extract custom tag informations for several specific function calls inside a Java source code and display them.
I would like to know if it is possible
1. execute javadoc within the same JVM, so that I can have access to RootDoc structure and manipulate it rather executing javadoc as a separate process, call up my Doclet passively and save the result into disk and then load the result after javadoc finishes.
2. execute javadoc within the same JVM multiple times...
3. Or are there any other tools that can fit my need? Like Eclipse JDT? I couldn't find much information with google so far :(
Thanks
The only option I can come up with is writing a small parser to go over the file you're trying to disect. After all, thats also what the javadoc utility does, and considering how this isn't a native part of the language itself...