Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 646
yan.kun Avatar asked Oct 21 '10 20:10

yan.kun


2 Answers

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.

like image 184
Tushar Joshi Avatar answered Oct 27 '22 00:10

Tushar Joshi


Just as an addition, if you are using cut and paste from on-line javadocs, don't forget to remove the index.html as it messes up the url.

like image 29
gigas Avatar answered Oct 26 '22 23:10

gigas