IntelliJ IDEA如何实现Eclipse式鼠标悬停弹出JavaDoc?为何@author不显示?
Hey there! Let me walk you through how to set up IntelliJ IDEA to show JavaDoc on hover just like Eclipse, and fix the missing @author info issue you're seeing.
How to Enable JavaDoc Popup on Hover in IntelliJ IDEA
Getting the hover popup working is straightforward—just tweak a few settings:
- Open IntelliJ IDEA and head to
File > Settings(orIntelliJ IDEA > Settingsif you're on macOS) - In the settings window, navigate to
Editor > General - Look for the Code Completion section. Find the
Show documentation popup inoption, set your preferred delay (you can set it to 0 for instant popups, matching Eclipse's behavior) - Make sure the checkbox next to this option is checked. Also, in the Other subsection of
Editor > General, confirm thatShow quick documentation on mouse moveis enabled—this is critical for the hover functionality - Hit
ApplythenOKto save changes. Now hovering over classes, methods, or variables will trigger the JavaDoc popup just like you're used to in Eclipse.
The short answer is: IntelliJ hides @author by default to keep documentation popups clean. But you can easily re-enable it:
- Go back to
File > Settings(orIntelliJ IDEA > Settingson macOS) - Navigate to
Editor > General > Documentation - In the Rendered documentation section, look for the
Do not showlist. Find@authorin that list, select it, and click the minus button-to remove it - (Optional) You can also check the
Show tagssection to ensure@authoris included there, though removing it from the "Do not show" list is usually sufficient - Save your changes with
ApplyandOK. Now the@authorinformation will appear in all JavaDoc popups, just like in Eclipse.
Pro tip: If you ever want to pull up the JavaDoc instantly without waiting for the hover, use the shortcut Ctrl+Q (Windows/Linux) or F1 (macOS) to bring it up right away.
内容的提问来源于stack exchange,提问作者Stephen.lin
相关产品推荐
相关产品推荐

