在 Intellij IDEA 中附加额外的 javadoc
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/91307/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Attaching additional javadoc in Intellij IDEA
提问by homaxto
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.
当我对 j2ee 类或 IDEA 中的注释使用快速文档查找 (Ctrl+Q) 时,我只得到一个空的 javadoc。它只包含类名等基础知识。
How do I add the javadoc to the libs IDEA provides itself?
如何将 javadoc 添加到 IDEA 提供的库中?
采纳答案by Hugo Palma
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.
您可以将 javadoc 附加到您在模块或项目中配置的任何库。只需访问项目结构窗口(File -> Project Structure)
,然后选择“模块”并选择具有您要配置的依赖项的模块。
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.
然后选择“依赖项”选项卡,选择缺少 javadoc 的依赖项并单击“编辑”。在刚刚出现的窗口中,您会看到两个按钮“添加”和“指定 Javadoc URL”。如果您在 jar 文件中有 javadoc,请选择第一个,如果您想指向包含 javadoc 的网站,请选择最新的。就是这样。
回答by albfan
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
扩展 API 的文档呢?我已经将 j3d API 添加到我的 jdk1.6 并成功使用它,下一步,获取 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-)
忘记 java.sun.com 上的链接(这是一团糟)直接访问 java.net 并获取所有内容(API、javadoc,甚至获取源代码-对于每个包-)
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
转到您的 jdk 并选择文档路径并添加 javadoc zip。转到源选项卡并添加源的 zip
You're done.
你完成了。
Actually only the source is needed to enjoy javadoc and the uncompiled classes
实际上只需要源代码就可以享受 javadoc 和未编译的类
回答by JMess
If using maven:
如果使用 Maven:
"right click on your pom.xml" -> "Maven" -> then choose "Download Sources and Documentation"
“右键单击您的 pom.xml”->“Maven”-> 然后选择“下载源代码和文档”
To avoid this in the future: "Preferences" -> "Build, Execution, Deployment" -> "Build Tools" -> "Maven" -> "Importing" -> Check the Automatically download Sources and Documentation boxes.
为避免将来发生这种情况:“首选项”->“构建、执行、部署”->“构建工具”->“Maven”->“导入”-> 选中自动下载源和文档框。
Credit to Yacov Schondorf and Stephen Boesch from Intellij user forums.
感谢来自 Intellij 用户论坛的 Yacov Schondorf 和 Stephen Boesch。
回答by oneslide icywater
right click on the maven pom.xml -> "Maven" ->Download documentation,wait for a sec,you'll make it!
右键maven pom.xml -> "Maven" -> 下载文档,稍等片刻,你就成功了!