IntelliJ IDEA automatically displays a red line if it cannot resolve some objects or detects an error. Is there a way to copy and paste the contents of this tooltip?
No, the hints do not offer a way to get this information only from your context.
You can traditionally compile it instead of Build -> Compile and get an error message this way. Then you can select this text and do what you want with it.
With eclipse, I use f2 to get information.
I used the idea of 14.1.4 and used this method to copy tooltips.
You can click the error line and the information will be displayed, now you can right-click to copy this error information.
Since 2011 there is an error report (!). Feel free to call to vote to fix the bug:
https://youtrack.jetbrains.com/issue/IDEA-65636
IDEA-65636 I cannot copy text from a tooltip, although I can select it
Although, frankly, JetBrains rarely does without supercritical bug fixes.