在Eclipse中,当鼠标悬停在一个方法、变量等上时,会显示一个带有相应JavaDocs的工具提示。IntelliJ中有这样的特性吗?


当前回答

按CTRL+Q后,就可以了

固定工具提示(右上角) 检查停靠模式(固定后在右上齿轮下) 大小按需 单击图标以自动显示所选项目的文档

然后,当您移动光标时,文档将出现在此框中。它会占用一些屏幕空间,但我觉得很值得。

我想发布一个截图,但SO不让我发布图像。

其他回答

IntelliJ IDEA 14.0.3终极版:按Ctrl+Alt+S,然后选择编辑器\通用选择显示鼠标移动时的快速提示

提示:在JavaDoc弹出窗口的右上角(齿轮图标),你可以选择: -显示工具栏 -固定模式 -停靠模式 —浮动模式 —分裂模式

文件- >设置- >编辑器

选中“在鼠标上显示快速文件”

现在,当您将鼠标放在一个方法上时,将出现一个带有文档的工具提示。有时工具提示的大小太小,你将不得不调整它移动鼠标到工具提示的底部。

根据ADNow的说法。关于麦金塔:

右键单击IntelliJ IDEA 12 单击Show Package Contents菜单选项 打开bin文件夹 打开idea.properties 加一行: auto.show.quick.doc = true

从IntelliJ Ultimate 2018.1.5,也就是IntelliJ IDEA 2018.1.5,到2019.3,在File -> Preferences下实际上有两个选项:

In Editor > General > Other (section) > Show quick documentation on mouse move - delay 500 ms Select this check box to show quick documentation for the symbol at caret. The quick documentation pop-up window appears after the specified delay. In Editor > General > Code Completion (sub-item) > Auto-display documentation in 1000 ms Select this check box to have IntelliJ IDEA automatically show a pop-up window with the documentation for the class, method, or field currently highlighted in the lookup list. If this check box is not selected, use Ctrl+Q to show quick documentation for the element at caret. Quick documentation window will automatically pop up with the specified delay in those cases only, when code completion has been invoked explicitly. For the automatic code completion list, documentation window will only show up on pressing Ctrl+Q.

在2020.1编辑器中添加了javadocs渲染。屏幕截图借用了intellij文档。