简体   繁体   中英

How to add online available javadoc to a downloaded Library in Netbeans?

maybe the answer is easy, but I'm unable to find information about the topic on google.

I've downloaded the MacWidgets Library from http://code.google.com/p/macwidgets/ .

On the site you can also find the javadocs and I would like to integrate this into Netbeans to provide me with information about classes / methods while typing like on the normal java api.

Is this somehow possible? Or do I have to download the source, create a project out of it and reference the project instead of the libraries?

I confirmed with the latest NetBeans IDE 7.0 M2 version released on http://www.netbeans.org They have provided support for URL configuration for the Javadoc.

Steps to use this feature

  1. First create a library for the MacWidgets JAR files using Tools > Libraries dialog box.
  2. For the created library set the URL of the Javadoc using the Javadoc tab and URL button, in this case the URL shall be http://exploding-pixels.com/google_code/javadoc_0.9.5/
  3. Now when any class from this library is referred in the Java code editor NetBeans will show Javadoc in below the context sensitive code completion as well as in the javadoc window if it is open.

This feature is recently added and only available from NetBeans IDE 7.0 M2, release and onwards. This feature is still having some issues and opening Javadoc directly by right clicking the JAR node in the project panel library node does not work yet.

UPDATE (29 Apr 2011)
With the release of latest NetBeans IDE 7.0 the issues related to Javadoc from URL are solved. You can use a HTTP URL to specify Javadoc for third party libraries without any issues now. The issue reported by me about right clicking the JAR node is also fixed by the NetBeans developer team.

另外,如果您使用来自在线javadoc的剪切和粘贴,请不要忘记删除index.html,因为它会弄乱网址。

Step 1: Go to the /Libraries/.jar
Step 2: Right-click on the particular jar file.
Step 3: 4 options will appear --> select Edit
Step 4: Click on Edit.
Step 5: Browse Javadoc and provide the doc path till API.

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