如何在 IntelliJ IDEA 中查看 JavaDoc? [英] How to see JavaDoc in IntelliJ IDEA?

查看:54
本文介绍了如何在 IntelliJ IDEA 中查看 JavaDoc?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚从 Eclipse 切换到 IntelliJ.IntelliJ 缺少 Eclipse 的一项功能 - 当您将鼠标放在某个方法上时,Eclipse 会显示 javadoc 信息.我认为显示它的方法是使用快捷方式 - command+J,但是当我单击它时,出现如下屏幕截图所示的错误.请告诉我如何快速获取 javadoc 信息.我至少需要知道一个方法返回什么类型.

解决方案

使用View |快速文档或相应的键盘快捷键(默认情况下:Windows/Linux 上的 Ctrl+QCtrl+J 或最近 IDE 版本中的 F1).请参阅

另一种查看快速文档的方式是鼠标移动:

I just switched from Eclipse to IntelliJ. IntelliJ lacks one feature from Eclipse - when you put your mouse over a method, Eclipse shows javadoc info. I think the way to show it is to use a shortcut - command+J, but when I click it, I get something wrong as on the screen shot below. Please advise me on how I can quickly get javadoc information. I need to at least know what type a method returns.

解决方案

Use View | Quick Documentation or the corresponding keyboard shortcut (by default: Ctrl+Q on Windows/Linux and Ctrl+J on macOS or F1 in the recent IDE versions). See the documentation for more information.

It's also possible to enable automatic JavaDoc popup on explicit (invoked by a shortcut) code completion in Settings | Editor | General | Code completion (Autopopup documentation):

Yet another way to see the quick doc is on mouse move:

这篇关于如何在 IntelliJ IDEA 中查看 JavaDoc?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆