简体   繁体   中英

Attaching additional javadoc in Intellij IDEA

When I use quick documentaion lookup (Ctrl+Q) on j2ee classes or annotations in IDEA I only get an empty javadoc. It only contains the basics like class name.

How do I add the javadoc to the libs IDEA provides itself?

You can attach javadoc to any library you have configure in your module or project. Just access the project structure windows (File -> Project Structure) , then select "modules" and select the module that has the dependency you want to configure.

Then select the "Dependencies" tab, select the dependency that's missing the javadoc and click "Edit". In the window that just showed up you see two buttons "Add" and "Specify Javadoc URL". If you have the javadoc in a jar file select the first one, if you want to point to a web site that contains the javadoc select the latest. That's it.

If using maven:

"right click on your pom.xml" -> "Maven" -> then choose "Download Sources and Documentation"

To avoid this in the future: "Preferences" -> "Build, Execution, Deployment" -> "Build Tools" -> "Maven" -> "Importing" -> Check the Automatically download Sources and Documentation boxes.

Credit to Yacov Schondorf and Stephen Boesch from Intellij user forums.

What about documentation for an extension API? I had added the j3d API to my jdk1.6 and use it succesfully, next step, get the javadoc

Forget the links on java.sun.com (It is a mess) Go directly to java.net and get all the stuff (API, javadoc, get the source even -for every package-)

Go to your jdk and selected the documentation path and add the javadoc zip. Go to the source tab and add the source's zip

You're done.

Actually only the source is needed to enjoy javadoc and the uncompiled classes

右键maven pom.xml -> "Maven" -> 下载文档,稍等片刻,你就成功了!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM