NetBeans Quick Tip #33 - Show Error Using Keyboard

Guest Author

One of my issues with previous releases of NetBeans IDE was that there was no way how to easily see an error in the editor. The code would get underlined by a red line if there was an error but to discover the error message I always had to move away from the keyboard and use my mouse to hover on the error mark. Then I could see the error and I would switch back to the keyboard to go fix it. Maybe there was a better way to do this but I didn't find it.

Today I realized that in NetBeans 6.0 there is a way how to achieve this - hurray, I don't have to switch to the mouse! So here's the trick - you need to move to the row with the error (with the underline) and press Alt-Enter - yes the same shortcut you use to invoke a hint (aka quick fix aka lightbulb). After pressing Alt-Enter on the row with an error you can see the cause of it:

I thought this was really useful, because switching to the mouse takes some of my time and I may lose concentration. 

Join the discussion

Comments ( 2 )
  • williamchen Wednesday, September 5, 2007

    I found that too, but very long time ago:)

    Alt-Enter is also the way to invoke quick-fix.

  • Kirill Sorokin Thursday, September 6, 2007

    Cool, thanks!

    Yet I do not know the keyboard way to browse through annotations if there are several for a single line (e.g. an error and a code hint or whatever). Is there any?

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.