在Eclipse中,当鼠标悬停在一个方法、变量等上时,会显示一个带有相应JavaDocs的工具提示。IntelliJ中有这样的特性吗?
当前回答
上面所有的方法都很有用,但是有一个基本的东西你需要在你的JDK中有src.zip (C:\Program Files\Java\jdk1.8.0_171)。我以为它是预装的,但出于某种原因,它没有出现在我的安装。另一件需要检查的事情是,您的项目是否使用指定的JDK(在本例中为1.8.0_171)。
其他回答
IntelliJ IDEA 14.0.3终极版:按Ctrl+Alt+S,然后选择编辑器\通用选择显示鼠标移动时的快速提示
提示:在JavaDoc弹出窗口的右上角(齿轮图标),你可以选择: -显示工具栏 -固定模式 -停靠模式 —浮动模式 —分裂模式
上面所有的方法都很有用,但是有一个基本的东西你需要在你的JDK中有src.zip (C:\Program Files\Java\jdk1.8.0_171)。我以为它是预装的,但出于某种原因,它没有出现在我的安装。另一件需要检查的事情是,您的项目是否使用指定的JDK(在本例中为1.8.0_171)。
从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.
在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的回答。
推荐文章
- 在java中使用wait()和notify()的简单场景
- 增强的for循环中的Null检查
- c# vs Java Enum(适合c#新手)
- 如何在不强制转换的情况下将double转换为long ?
- for循环和for-each循环在性能上有区别吗?
- 你如何比较两个版本的字符串在Java?
- 为什么在Java和。net中不能修改字符串?
- java.util.Random真的那么随机吗?我怎么能生成52!(阶乘)可能的序列?
- ZoneOffset之间的区别是什么。UTC和ZoneId.of(“UTC”)?
- 类未找到:IntelliJ中的空测试套件
- 将JAR文件添加到Spark作业- Spark -submit
- REST API - dto还是不是?
- JavaFX应用程序图标
- Java:强/软/弱/幻影引用的区别
- 在序列化和反序列化期间JSON属性的不同名称