Eclipse: add javadoc

强颜欢笑 提交于 2019-12-18 13:15:13

问题


How can I generally add javadoc in eclipse for different packages.

As an example:
I want to add all the javadoc for hibernate in eclipse, but I don't know how. I've read this article How to add hibernate javadocs in Eclipse? but I don't want to get hibernate tools because I already use STS and I don't understand the other comment.

I'm using eclipse on Ubuntu.


回答1:


Another option is to use maven/m2eclipse to manage your dependencies.

It's way overkill if you have the problem for 1 or 2 libraries, but worth considering if you have a dozen.

Most open source projects publish both the jar and the -src.jar artifacts, and m2eclipse can go and download automatically the source for you.




回答2:


I am using Eclipse Helios x64 in Windows 7 x64.

In your project properties:




回答3:


Run

mvn eclipse:eclipse -DdownloadJavadocs=true -DdownloadSources=true

and refresh your eclipse module. Voila! No need for any eclipse plugins (unless you are already using them).




回答4:


In Eclipse Kepler (some years after the question, admittedly), there's a Download JavaDoc entry on the Maven submenu. This just downloaded the Spring JavaDoc (and the status message said "Downloading Javadoc and sources", but I haven't checked that). (There's also a Download Sources entry on that submenu.)

Hope this helps.




回答5:


Right-click on the hibernate jar in the package explorer, then choose "Properties", and fill the "javadoc location" field.




回答6:


Try viewing the properties of your project to add a JavaDoc Location.



来源:https://stackoverflow.com/questions/7043489/eclipse-add-javadoc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!