NetBeans Quick Tip #33 - Show Error Using Keyboard

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. 

Comments:

I found that too, but very long time ago:)
Alt-Enter is also the way to invoke quick-fix.

Posted by williamchen on září 05, 2007 at 10:29 odp. CEST #

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?

Posted by Kirill Sorokin on září 06, 2007 at 06:55 dop. CEST #

Post a Comment:
Comments are closed for this entry.
About

Roman Strobl

Search

Archives
« duben 2014
PoÚtStČtSoNe
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today