IntelliJ IDEA 鼠标悬停方法显示 Java Doc
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7739251/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
IntelliJ IDEA mouse over method show Java Doc
提问by Ali
I'm using IntelliJ IDEA 9, Is there a way to configure IDEA so that when I pause my mouse over a method, IDEA pulls up the javadoc (the same thing as CTRL+Qdoes)?
我正在使用 IntelliJ IDEA 9,有没有办法配置 IDEA,以便当我将鼠标悬停在某个方法上时,IDEA 会调出 javadoc(与CTRL+相同Q)?
采纳答案by CrazyCoder
There is no such feature right now, feel free to vote for the existing enhancement request.
目前没有这样的功能,请随意投票支持现有的增强请求。
As stated in the comments, one can write a plug-in that will add this functionality.
正如评论中所述,可以编写一个插件来添加此功能。
Edit
Since this is the first hit on Google about this I would like to add that Edolsa's answer hereis the correct solution as of January 2014.
编辑
由于这是第一次打在谷歌这个我想补充一点,Edolsa的答案在这里是正确的解决方案,2014年1月的。
回答by code_flow
Just to update, IntelliJ 13.0 is now released and has this feature.
只是为了更新,IntelliJ 13.0 现已发布并具有此功能。
Location in 13.0:
在 13.0 中的位置:
Preferences -> Editor -> Other -> "Show quick doc on mouse move"
首选项 -> 编辑器 -> 其他 -> “鼠标移动时显示快速文档”
Location in 13.1 (and later):
13.1(及更高版本)中的位置:
File -> Settings -> Editor -> General -> "Other" section -> "Show quick documentation on mouse move"
文件 -> 设置 -> 编辑器 -> 常规 -> “其他”部分 -> “显示鼠标移动的快速文档”
You can even set the hover time (in ms) and once the doc pane opens, you can Pin it to one of the sides and it becomes one of the windows, like Console or Terminal. This is very handy, as you just over over and look at the pinned window.
您甚至可以设置悬停时间(以毫秒为单位),一旦文档窗格打开,您可以将其固定到一侧,它就会成为窗口之一,如控制台或终端。这非常方便,因为您刚刚过去并查看固定窗口。
回答by odiggity
There is a setting under Preferences -> Editor -> Show quick doc on mouse move, but I've found it's completely unusable. It shows the quick doc for all variables so when you're hovering over to find out what a variable's value is the quick doc blocks it. Also most of the time the doc is collapsed and it's a pain to get to the right hand corner without it disappearing to expand it. Needs work, doesn't work nearly as well as it did in Eclipse.
在首选项 -> 编辑器 -> 鼠标移动时显示快速文档下有一个设置,但我发现它完全无法使用。它显示了所有变量的快速文档,因此当您悬停以找出变量的值时,快速文档会阻止它。此外,大多数时候文档是折叠的,到达右手角而不会消失以展开它是很痛苦的。需要工作,但几乎没有在 Eclipse 中工作得那么好。
回答by Ivan Morgillo
I'm migrating to Android Studio. I miss this Eclipse feature too.
我正在迁移到 Android Studio。我也很想念这个 Eclipse 功能。
I created a new shourtcut for Quick documentationcommand: Alt + Left click
我为快速文档命令创建了一个新的快捷方式:Alt + 左键单击
(Preferences -> Keymap -> Quick documentation)
(首选项 -> 键盘映射 -> 快速文档)
It seems comfortable and gets the job done.
它看起来很舒服,可以完成工作。
回答by Michal Z m u d a
Add to idea.properties the following line and restart Intellij
将以下行添加到 idea.properties 并重新启动 Intellij
auto.show.quick.doc=true