Javadoc for extension APIs

HI

It seems that attaching documentation paths for third party APIs in IntelliJIDEA 11.1.3 might be broken. Whilst I can see the javadoc for  Java SDK (1.7.7) I can't seem to get to the javadocs for a number of 3rd party libraries (eg the ejml library). This might be an OS X (Mountain Lion) problem, so just to check if anyone else has the same issue or has solved it. Any help would be much appreciated.

By the way, wouldn't be much more logical to have the documentation paths associated with the global and/or project libraries rather than with the SDKs? I always find it confusing and actually annoying to have to put the documentation path for a thrid party API in the documentation path list associated with the SDK. I mean often 3rd party libraries will be used with different versions of the SDK...

Many thanks

David

1 comment
Comment actions Permalink

brownidj wrote:

By the way, wouldn't be much more logical to have the documentation paths associated with the global and/or project libraries rather than with the SDKs? I always find it confusing and actually annoying to have to put the documentation path for a thrid party API in the documentation path list associated with the SDK. I mean often 3rd party libraries will be used with different versions of the SDK.

Documentation for a library is configured as part of the global library or project library configuration, not the SDK definition:
screenshot.png
When you create a new library, you can select the directories and/or jars that hold the classes, sources, and javadocs. IDEA will automatically configure the library definition with each appropriate component by analyzing the files and/or directories.
screenshot2.png
In the above screenshot, I could select either the commons-io-1.3.2-javadoc.jar file, or the docs/apidocs directory to attach the javadocs. The advantage of specifying the directory is that when viewing the Javadoc in the quick document window, I can click a button to ask IDEA to open the Javadoc in an external browser. This can still be done with JAR based javadoc, but IDEA would need to first extract the jar to a directory in the IDEA system caches directory. With the sources, I can add add with the sources jar or the sources directory. No real difference either way.

To specify a URL for the Javadoc create the library definition without a javadoc specification. Then to add sources or Javadoc (file based or URL based) to an existing library, select it from the list of libraries and click the add icon on the main panel. The select to add either a file/directory (to add sources, classes or file based javadoc) or a URL for URL based javadoc:
screenshot3.png
For more information, click the Help button on the Libraries setting dialog. The help page will explain these options.

The reason you are not currently seeing any javadocs is that IDEA checks the corresponding library definition (of where the class is found) for the documentation and not any other configurations, including the SDK. Only SDK documentation should be configured under the SDK definition.

0

Please sign in to leave a comment.