In eclipse when you hover over some erroneous text you can press F2 to focus there. What is the equivalent procedure in IntelliJ?
Whenever I put my pointer over some error the text describing it disappears.
In Eclipse it will suggest what I can do to fix something like an unhandled IO exception. I'm sure IntelliJ can also do this because some people I know who are quite skillful programmers highly recommended it to me, but- how to do this?
That is: hover over some text at is in error, see what the error is, the options to fix it, and then choose one.
If you click on the highlighted part of code, the error description will appear in a pop-up bubble as well as in statusbar.
You can then hit ALT+Enter which will offer you some options to handle the given error/warning or to disable the warning.
The actions you are looking for is called "Error Description" and "Show Intention Actions".
⌘+F1 (Ctrl+F1 on non-mac) will show the error info on based on where the caret is.
Alt+Enter will show the Intention Actions available based of the location of the caret.
Related
I am using IntelliJ IDEA (2016.3) linux version for Java development. As shown in the image below when the mouse pointer hover over an error line, the error message is overlapped by the javadoc making it harder to read the given error message. How to fix this?. Thanks in advance
I use 2017.1.3 EAP on Win10 and it is the same. Seems like a bug.
There are several workarounds:
Set time delay for documentation popup to a higher value. This should give you more time to read the error message. (Settings -> Editor -> General -> Show quick documentation on mouse move).
Set a cursor at the code with the error and you will see a duplicated error message in the status bar.
You can also have the documentation in a fixed spot by clicking the pin in the top right corner of the pop-up. The window will then always be there, but it does update on mouse-overs and it is not over the warning- and errormessages anymore.
This happened to me in Android Studio and I've just removed documentation on mouse hover setting and set a Shortcut Key (Alt+D) for that. This is more comfortable for me.
When hovering over code in Phpstorm, I get a popup like below. Every hover produces a similar popup like these below:
Edit: I've realized the popups only occur during live edit.
But I still cant find a setting to turn them off.
They can't be turned off.
This is part of "inspections" (validations) which I think is necessary in any editor to prevent syntax and run-time errors. PHPStorm goes a step further than something like Eclipse (which has validations but lets you disable the pop-ups), and as far as I can tell, the PHPStorm developers are not interested in an option to disable the pop-ups. I have no clue why as they constantly get in the way of me clicking or typing.
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?
With eclipse I use the f2 to get the information.
I used the idea version 14.1.4 and use this way to copy the tooltips.
You can click the error line and the info will display, now you can right click to copy this error info.
Mouse shortcut:
Hover mouse over error in editor to bring up tooltip
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.
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 :)
No, the tooltips don't offer a way to get that information from their context alone.
You could traditionally compile it instead via Build -> Compile and get the error message that way, instead. You can then select this text and do with it what you wish.
There is a bug report on this since 2011 (!) . Feel free /encouraged to vote for having the bug fixed:
https://youtrack.jetbrains.com/issue/IDEA-65636
IDEA-65636 I can't copy text from tooltip, though I can select it
Though honestly JetBrains infrequently gets around to non super critical bug fixes.
Is there a shortcut key to dismiss the lines that get highlighted yellow and red for warnings and errors, instead of having to click one by one on the symbols in the gutter?
I have tried searching but this particular nugget of wisdom isn't easy to find, if indeed it's out there.
Thanks.
The shortcut you're looking for is Control-Command-M which corresponds to Issues->Show All Issues in Xcode's Key Bindings settings menu. You can change this shortcut to what ever you'd like, and it will toggle wether or not error messages will be visible on screen.
I don't know if you already tried that or if that's what you're searching, but there is the menu "Editor" -> "Issues" -> "Hide all issues" command that maybe can be useful
I like to use my mouse as little as possible for health reasons. Almost all the common tasks in IntelliJ I can do via keyboard shortcuts, except for displaying the message of an error. How can I have a keyboard shortcut that will show the tooltip of the highlighted error?
For example, I have an error such as:
Then I hit [magic-keyboard-command] and I get:
In Eclipse this is possible by pressing F2. Is there an equivalent in IntelliJ?
The standard Error Description shortcut for JetBrains tools is Ctrl+F1 (Cmd+F1 on Mac).
I use F2 on the mac, it cycles round all the errors in a single file and displays the error information for each.
In addition, to find all project errors what I do is this:
cmd+2 - go to error list (this might be different for diff languages)
press enter key
make change to fix bug
back to step 1 (sometimes escape key will help also)