Can I get help for API symbol under cursor?

Hello,
I'm pretty new to Java and frequently need documentation for various classes and methods I use. Does IDEA have a feature to get help for symbol under cursor?
Thanks,
Sergei Dyshel

5 comments

Certainly! It's the so-called "Quick Documentation Look-up" (View menu) which is, by default, associated with CTRL-Q (CMD-Q on the Mac, I suppose).

Randall Schulz

0

Randall, thanks for quick responding! Somehow I missed this feature. May be you know if can jump to HTML documentation as well (online or offline)? This quick documentation item is great but it lacks list of members with description of each one.

0

Two things:

  1. Also in the View menu, the command immediately below "Quick Documentation Lookup" is "External Documentation" (SHIFT-F1). This opens the full documentation page in your external browser (configurable in the Settings)
  2. Hyperlinks in the Quick Documentation pop-ups also open the external browser to that link.



As a general rule, exploring the menus is a good thing. It can often tip you off to capabilities you weren't aware of.


Randall Schulz

0

"External doc" is disabled (grayed) in my menu. I guess I need to setup external documentation path for this. Where in the settings dialog should I do this?

0

I can only guess why it's not enabled for you:

  1. You don't have an external browser configured
  2. You don't have a documentation URL specified for the library or module that supplies the symbol in question


Regarding (1), you configure the program to invoke to open URLs in the external browser in the "Web Browsers" section of the Settings dialog.

Regarding (2), you specify documentation JAR, base directories or URLs in the Project Structure dialog. For libraries you click the "Attach Documentation..." button if the documentation is local (in a JAR file or loose in a directory) or "Specify Documentation URL..." button if you want to access documentation via a Web server. For modules, documentation is attached in the module's Paths tab.

Note that if you generate documentation from within IDEA (Tools menu  -> "Generate JavaDoc..." command) you tell it where to place the resulting HTML (and related) files and that is not inherently tied to the module documentation path mentioned in (2) above.


Randall Schulz

0

Please sign in to leave a comment.