4

I just downloaded IntelliJ IDEA and trying to do something usefull with it. I'm using scala plugin. It seems that IntelliJ downloads all libraries + javadocs mentioned in build.sbt project dependencies.

How can I launch browser based API documentation from IntelliJ? I'm looking for a way to see all classes in an API.

Example:

I use scalajs-dom library in my project. Then I would like to launch following documentation (which IntelliJ has already downloaded into my system) from somewhere inside the IntelliJ IDEA: http://www.scala-js.org/api/scalajs-dom/0.9.0/#org.scalajs.dom.package

In my mind a Good place for launching this might be project window / external libraries / scalajs-dom but it is not there.

Another good place might be in editor, whenever you point e.g. class belonging to scala.js library, you could select from popup menu something like "API Documentation" but it is not there either.

EDIT: IntelliJ IDEA help about external docs: https://www.jetbrains.com/idea/help/viewing-external-documentation.html

  • In my IDEA (community edition v15.0.4) there is no External documentation command in View menu
  • Pressing Shift+F1 does nothing even when selected a class having javadoc
  • Quick documentation lookup window arrow up (=view external documentation) is always disabled

But on Project window / external libraries, select a lib and then Open library settings I see that there are libraries, sources and javadocs.

Quick documentation window works fine.

EDIT2: If I hit Ctrl + Shift + A IntelliJ opens "Enter action or option name" dialog. External documentation is there but it is greyed, I cannot select it or do anything with it.

4

2 Answers 2

2

Try to find action External Documentation by Ctrl+Shift+A search action feature. It must be in Code View Actions.

To enable Quick Documentation by passing Shift+F1 go to Project Structure and here in SDKs on Documentation Paths tab specify URL click on plus with the Earth.

enter image description here

So now Quick Documentation must work and View external documentation too.

4
  • External documentation in search action is greyed, I cannot select it. Quick documentation works fine, it has been working fine since beginning. Mar 6, 2016 at 18:09
  • @ Did you add url for java api ? Mar 6, 2016 at 18:51
  • I tried two choices: the url and locally installed javadoc dir. In both cases External documentation was still grey in "search actions" and not in View menu. Mar 6, 2016 at 19:51
  • @user4955663 It works for on IntelliJ Ultimatum edition Mar 7, 2016 at 8:52
2

The only reason for View External Documentation being disabled is that IDEA cannot locate javadoc file for your classes. You have to make sure there are javadoc files for every dependency you want to view documentation for in an external viewer.

In IDEA you can right-click on the project and select Maven -> Download Documentation to have all javadoc files for dependencies in place.

Here is another SO question that shows how to attach javadocs to selected dependencies

1
  • Important to note that this counts for JVMs as well. If the path/url to the particular JVM is not set for the project, nothing happens when you press, SHIFT + F1. After the path is configured, it will open the relevant javadoc in the browser. BTW, I'm describing IntelliJ IDEA Community edition 2019.
    – Charlweed
    Sep 17, 2019 at 2:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.