Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I copy and paste the tooltip error message that pops up in IntelliJ IDEA?

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?

enter image description here

like image 275
Peiti Li Avatar asked Sep 15 '15 23:09

Peiti Li


People also ask

How do I copy text from a 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.

How do I copy and paste in IntelliJ?

Press Ctrl+Alt+Shift+V or choose Edit | Paste | Paste as Plain Text from the main menu .

What is tooltip content?

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.

How to see method description in IntelliJ?

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 .


2 Answers

Mouse shortcut:

  1. Hover mouse over error in editor to bring up tooltip
  2. Alt + click on error message inside tooltip to copy it to clipboard

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.

like image 67
Jens Piegsa Avatar answered Oct 01 '22 12:10

Jens Piegsa


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 :)

like image 44
grreeenn Avatar answered Oct 01 '22 11:10

grreeenn