在Eclipse中,当鼠标悬停在一个方法、变量等上时,会显示一个带有相应JavaDocs的工具提示。IntelliJ中有这样的特性吗?
当前回答
其他回答
在IntelliJ版本11之前,不,不仅仅是将鼠标悬停在它上面。如果光标在方法名或属性名内,那么CTRL+Q将显示*nix和Windows上的JavaDoc。在MacOSX上,按CTRL+J。
引用:“不,查看完整javadoc的唯一方法是使用Quick Doc (Ctrl-Q)。”——http://devnet.jetbrains.net/thread/121174
EDIT
从IntelliJ 12.1开始,这是可能的。请看@ADNow的回答。
按CTRL+Q后,就可以了
固定工具提示(右上角) 检查停靠模式(固定后在右上齿轮下) 大小按需 单击图标以自动显示所选项目的文档
然后,当您移动光标时,文档将出现在此框中。它会占用一些屏幕空间,但我觉得很值得。
我想发布一个截图,但SO不让我发布图像。
在Mac上的IntelliJ U上,我需要用光标指向一些方法,变量等,然后按[cntrl]或[cmd]键。然后点击弹出窗口中的链接,弹出窗口中出现了JavaDocs
从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.
我尝试了这里提到的许多方法,特别是首选项-编辑器-通用-代码完成-显示文档弹出..在2019.2.2版本中无效
最后,我只是使用F1,而插入符号是在类型/方法上,它很好地显示文档。这并不理想,但很有帮助。
推荐文章
- 导致java.lang.VerifyError错误的原因
- 如何在Java中监控计算机的CPU、内存和磁盘使用情况?
- 如何设置超时在改造库?
- java lambda可以有一个以上的参数吗?
- HashMap -获取第一个键值
- 使用Jackson将JSON字符串转换为漂亮的打印JSON输出
- Android - SPAN_EXCLUSIVE_EXCLUSIVE跨度不能为零长度
- Javadoc @see或{@link}?
- 在准备语句中使用“like”通配符
- Android Eclipse -无法找到*.apk
- 通过SSH使用Eclipse完成远程项目
- javac和Eclipse编译器之间的区别是什么?
- 工厂模式和策略模式之间的区别是什么?
- 在Java中使用正则表达式提取值
- 如何允许所有网络连接类型HTTP和HTTPS在Android(9)馅饼?