Intellij IDEA not showing full javadoc in small window

倖福魔咒の 提交于 2020-06-29 04:04:28

问题


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.


回答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.




回答2:


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)


来源:https://stackoverflow.com/questions/60015654/intellij-idea-not-showing-full-javadoc-in-small-window

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!