Quick Documentation not working on Java libraries or Scala methods

Answered

I recently upgraded to:

IntelliJ IDEA 2019.3 (Community Edition)
Build #IC-193.5233.102, built on November 27, 2019
Runtime version: 11.0.4+10-b520.11 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Registry: debugger.mayBringFrameToFrontOnBreakpoint=false
Non-Bundled Plugins: PythonCore, R4Intellij, YAML/Ansible support, de.netnexus.camelcaseplugin, io.protostuff.protostuff-jetbrains-plugin, org.intellij.scala, org.jetbrains.plugins.hocon

The behavior of Quick Documentation (F1) has changed, in two ways:

  1. Selecting something and hitting F1 pops up a documentation window that shows "val _: Nothing". This happens with Scala library class/objects, my own Scala class/objects, JDK libraries, and external libraries. For example, hitting F1 while the cursor is on a call to java.net.URL#openConnection(). Or if I have a case class called SearchRequest, hitting F1 on appearances of that inside methods. This used to pop up the Scaladoc or Javadoc.
  2. Selecting a Scala method call and hitting F1 pops up a documentation window that shows the Scaladoc of the enclosing method, not the method I've selected. For instance, if I have "def foo() = {}; def bar() = {foo()}", selecting the call to foo() and hitting F1 pops up the documentation for bar(). This used to pop up the documentation for foo().

Screenshots available on request.

Are either of these known issues?

0
4 comments

Is it specific to Scala projects or occurs in pure Java projects as well?

Do you have JDK configured properly with the sources and JavaDoc zip or URL specified?

From the problem description it looks like the sources are not available for the JDK and/or the libraries. Double check the JDK/libraries configuration.

Also check the logs for possible exceptions: Help | Compress Logs and Show in ...

0
Avatar
Permanently deleted user

I haven't tried a pure Java project.

I do have the JDK configured properly. I can command-B and go to the sources. But note that problem #1 happens with Scala libraries and even my own Scala code -- even methods that are defined in the same class as where I'm hitting F1.

The recent exceptions in the logs are all "java.lang.NoClassDefFoundError: com/intellij/psi/JavaPsiFacade", which I don't believe is related.

 

0

It looks like your installation may be corrupted, I'd reinstall from http://www.jetbrains.com/idea/download/index.html or via https://www.jetbrains.com/toolbox/app/ and also try a more recent Scala plug-in version:

 

If it still doesn't work, please at https://youtrack.jetbrains.com/newIssue?project=SCL with a small sample project attached and the logs.

0
Avatar
Permanently deleted user

I spent some time disabling plugins, and it turns out that the problem was R Language Support (v193.5233.358). With that disabled, everything is working again.

0

Please sign in to leave a comment.