Java doc overlap the error message in IntelliJ IDEA - intellij-idea

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.

Related

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?
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.

keyboard command to focus on erroneous text in IntelliJ IDE

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.

Missing "messages" window after compilation in IntelliJ

I'm using IntelliJ IDEA 12. When I run "make project", "debug" or "run" task it does some compiling, shows little bubble that there are warnings, shows grayed-out tool window "message" and after few seconds it hides the nameplate of messages window.
Why is compile log missing? What to do to fix this? I'd like to see (in IDE) what causes those warnings...
PS: I'm not sure, but it might started doing this when I started using Scala (it's now a mixed Scala-Java project).
If you've previously selected "Hide Warnings" then the Messages window is unavailable if there are no compilation errors. It is not even possible to show the empty window using View->Tool Windows-> Message or Alt-0.
Solution:
introduce a compilation error
build, the Messages window should reappear to show your error (or at least be accessible via the View menu)
go to the Messages window and deselect Hide Warnings
fix the compilation error
Rebuild Project and all your warnings will be visible
(I had the same symptoms on 13.0.2 and this worked for me)
For me, it pops up on "Rebuild Project". Maybe that helps.
The window should be there any time IDEA compiles the code. (If there is a not a code change, and you rerun something there is no compiling done and the message window will not show). It is accessible (by default) via Alt+0 (Zero, not the letter 'Oh') or via View > Tools Windows > Messages
You may have a combination of some tool window settings causing this.
If all the tool window buttons are hidden, the messages tool window will be as well. You can toggle this setting via View > Tool Button or the icon in the very bottom left corner of the IDE. To temporarily show the buttons when hidden, hit the Alt twice, holding it down on the second hit.
If the messages tool window is not set to "Docked Mode" and "Pinned Mode" it will close after the compile.
If the above is not the issue, make sure you are using the latest version of IntelliJ IDEA, v12.1.6, and the latest version of the scala plug-in, v0.22.302 (Go to Settings > [IDE Settings] > Plugins and look for the scala plug-in). Those versions work as expected for me.
Looks like u do not have any errors and warnings! In this case in Idea "Messages" tool window auto disappears. I hade the same issue and passes half an hour to understand the reason!

Keyboard shortcut to display error in IntelliJ

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)

Watching variables in Xcode

I'm trying to watch a variable with Xcode. I'm following the instructions in here by pausing at a breakpoint, selecting Run > Variables View > .... but with the exception of "Enable Data Formatters" the rest of the options are all greyed out. Any ideas?
I'm using Xcode version 3.1.3.
I haven't gotten watchpoints created from the Run menu to work for me either, unfortunately. One thing to be aware of is that when a variable goes out of scope, the watchpoint may become invalid.
If you don't mind getting a little more in-depth, you can use some low-level gdb commands to set a watchpoint for the address of the memory itself. For example, in the guide you linked to, they show how to watch the variable path which is a pointer with the value 0xbfffeb70. To manually set a watchpoint for that address, click in the debugger console (where the debugging output is printed) after the "(gdb)" prompt and type something like this:
watch *((int*)0xbfffeb70)
The cryptic syntax is necessary because gdb expects inputs as C expressions. For a little more detail, visit this link and jump to the section titled "Using hardware watchpoints". (I'm testing on an Intel machine, not sure how PowerPC handles it.) When you set watchpoints this way, Xcode will alert you with a drop-down sheet when a watchpoint is reached and tell you how the value was changed, and gdb will print the same info in the console.
I just ran into this problem. Here is a solution: right click on the variable name and select "View variable in window" from the menu which appears. It should be near the bottom.
Add a breakpoint. Right click in the watch list of the debug area and choose "Add expression..."
If you are getting a different menu, you have to click off of the currently highlighted variable so that nothing is highlighted when you right click.
The Answers given here only work if you use the gdb compiler. For those of you who are looking for an option to set a watchpoint with the lldb compiler I have bad news:
It's not working jet (XCode 4.3.2 with lldb 3.1) even though the lldb docs say you can.
Check out this Email. The lldb commands compared to the gdbs can be found here
I was trying to figure this out in XCode 5. I finally found a "Variables view" button at the bottom right of the output console. It's the little rectangle that will be gray on the left, white on the right if it's not enabled. I'm not sure if this is in XCode 3, but I expect most people have upgraded anyway.