IntelliJ IDEA automatically shows a red line if it cannot resolve some entities or it detects an error. Is there a way to copy and paste the content of that tooltip?
If you want easy solution: Move mouse pointer on the item you want to copy its tooltip to show tooltip, mark all contents on webpage (CTRL+A), copy it (CTRL+C) and paste it to text procesor (for example notepad++). The last line is the text in the tooltip.
Press Ctrl+Alt+Shift+V or choose Edit | Paste | Paste as Plain Text from the main menu .
Definition: A tooltip is a brief, informative message that appears when a user interacts with an element in a graphical user interface (GUI). Tooltips are usually initiated in one of two ways: through a mouse-hover gesture or through a keyboard-hover gesture.
In IntelliJ IDEA, you can identify the type of an expression in the following way: Place the caret at the necessary code element and press Ctrl+Shift+P (or select View | Type Info from the main menu). If several expressions are available, select the desired one from the popup menu and press Enter .
Mouse shortcut:
For step 1 you can also bring up the tooltip for the current carret position by Ctrl + F1. For step 2 there does not seem to exist a keyboard shortcut at the time of writing (for IntelliJ 2018.1), see also IDEA-65636.
If you stumbled upon looking for solution for Linux version (and none of the above worked for you, like for me) click ctrl+alt+left mouse button on the tooltip, and you'll get its content into the clipboard :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With