1

I remember that it was possible to see full javadoc in little window on hotkey in Eclipse some time ago (I used Eclipse Java two years ago). How can I see full javadoc in Intellij IDEA via hotkeys (Ctlr+Q of course, because I am using Ubuntu) or/and on mouse over? I see only function parameters and specified class information that I know, but I want to see a lot of description text from real Java documentation. I mean that small window with javadoc should contain this:

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

In the foregoing description, the notation sgn(expression) designates the mathematical signum function...

... etc. But I don't see this content.

Intellij IDEA javadoc not showing

Community
  • 1
  • 1
nick
  • 197
  • 1
  • 2
  • 16

2 Answers2

1

Most probably you ended up with JDK sources removed from your project. To resolve the issue go to Project Settings > Platform Settings > SDK > Sourcepath, navigate to your JDK installation and add its src.zip to the project.

Use the following image as a reference.

enter image description here

Yevgen
  • 1,576
  • 1
  • 15
  • 17
  • Thank you for answer. I think it should help me, but I don't have src.zip in my jdk's folder. Where can I find it? I am using IDEA jbr instead of JDK. And I see there are "Documentation Paths" bar. Do I must to configure it too? – nick Feb 02 '20 at 10:14
  • I've just downloaded `src.zip` from OpenJDK, but I can't move it to my JDK's path even with `sudo`. JDK path is `/snap/intellij-idea-ultimate/198/jbr` (OS Ubuntu 18.04). – nick Feb 02 '20 at 10:20
0

Do you mean Ctrl+Q+Q?


Also note that you can add {@inheritDoc} for inheriting JavaDoc to the overridden methods. Something like:

/**
 * {@inheritDoc}
 */
@Override
public int compare(Circle c1, Circle c2)
Eng.Fouad
  • 115,165
  • 71
  • 313
  • 417
  • Doesn't it do that automatically when there is no Javadoc comment at all? So it only makes sense if you add something before or after the {@inheritDoc}. – Clashsoft Feb 01 '20 at 14:01
  • Thank you for answer, but it doesn't helped me. `Ctrl` + `Q` + `Q` is only enrarges small window at the right side of IDEA, but it still doestn't contain normal documentation that I told in my question. – nick Feb 01 '20 at 14:46