How to attach JavaDocs and sources for servlet-api.jar
Hi all,
I'm trying IntelliJ IDEA for the first time, version 6.0.5.
I can see the JavaDocs for the basic Java APIs fine
(like java.util). However I'm trying since 30 minutes
to obtain the JavaDocs for servlet-api.jar and I simply
can't do it.
I've got a few questions:
Am I suppose to solve this by going into File / Settings /
Project structure / Project libraries then clicking on the
library I want to "attach" the JavaDocs/source to?
If so, is there any way to check that you've attached
the correct JavaDocs / sources ? It's expecting a
directory, but apparently I can give any directory and
the system isn't complaining (for example I can pass
the directory /mnt/ as the directory corresponding
to the JavaDocs for servlet-api.jar !?).
Basically I'm looking since quite a long time and I'm
beginning to feel very, very dumb, so detailed informations
would be very welcome.
A specific example with servlet-api.jar would be
excellent...
Driss
请先登录再写评论。
Responding to myself...
OK, I eventually managed to add a path to the external JavaDocs and now I can see the 'tooltip' showing the JavaDocs for servlet-api.jar.
However, there's something that is completely puzzling: imagine I'm on a RequestDispatcher object and ask for the tooltip about it's getServletContext() method... Everything is fine, I can see the JavaDocs as expected. But, if I ask to "go to the declaration", IntelliJ shows me a "decompiled stub" with no docs at all for the getServletContext() method, which is completely unintuitive to me.
I realize that I don't have the source, neither does IntelliJ. However it has the JavaDocs... As the source code is 'fake' anyway (it's a decompiled stub), why not 'enhance' it with the JavaDocs... Or at least make it clear that the JavaDocs for these methods are available?
I lost easily one hour on all this... Basically because I was mislead by that 'decompiled stub', not realizing it was quite different from the JavaDocs (that I actually had configured correctly, but instead of asking to see the JavaDocs I was jumping to a non-commented decompiled stub that I didn't really ask for).
Quite puzzling.