This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 222548

Summary: Output window - Shortcut keys Ctrl + period and Ctrl + Comma not working while navigating to Hyperlinked exceptions
Product: platform Reporter: dds.dhawal
Component: Output WindowAssignee: Jaroslav Havlin <jhavlin>
Status: RESOLVED FIXED    
Severity: normal CC: mmirilovic, psomol, uireviews
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description dds.dhawal 2012-11-21 14:11:21 UTC
Product Information:
Product Version: NetBeans IDE Dev (Build 201211110001)
Java: 1.7.0_10-ea; Java HotSpot(TM) Client VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_10-ea-b15
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
User directory: C:\Documents and Settings\Administrator\Application Data\NetBeans\dev
Cache directory: C:\Documents and Settings\Administrator\Local Settings\Application Data\NetBeans\Cache\dev

Test Specification: TS 61 OutputWindow [http://wiki.netbeans.org/TS_61_OutputWindow]

Steps to reproduce:

1. Write any erroneous program. Example:
	public static void main(String args[]) {
        Thread thread1 = new Thread("Thread-1") {
            public void run() {
                int i = 0;
                for (;;) {
                    i+;
                    try {
                        Thread.sleep(1000);
                    } catch (Exception ex) {
                    }
                    System.out.println("Thread-1: " + (i));
                    t {
                        Thread.sleep(2);
                    } catch (Exception ex) {
                    }
                }
            }
        };
    }
	
2. Run this program. Output window opens with compilation error information.
3. Make sure that focus is in output window. 
4. Now press shortcut keys cntrl + Period OR cntrl + Comma for next and previous errors. Error is NOT highlighted in the source editor window.
Comment 1 Jaroslav Havlin 2012-11-21 15:34:55 UTC
Indeed, the line with error is not selected if output window has focus (only the next error link is selected in the output window). But if editor has focus, the shortcuts work as expected.
Thank you for reporting it.

The test specification is not very clear in what should be focused. So maybe the current behavior is correct. I tested NetBeans 6.9, 7.0 and they work the same as the development build. So there is no recent regression.

Marian, Petr, please, can you check it? Do you think it should be changed or not?
Comment 2 Jaroslav Havlin 2012-11-23 15:20:10 UTC
Class OutputTab in module Output Window contains this code:

if (!io.getIOContainer().isActivated()) {
    ControllerOutputEvent ce = ...
    l.outputLineAction(ce);
}

The line listener action is intentionally invoked only if the Output Window is active (has focus). So the test specification seems to be incorrect.
Comment 3 Petr Somol 2012-11-29 15:17:24 UTC
I checked the spec at [http://wiki.netbeans.org/TS_61_OutputWindow] and can confirm that the current behavior diverts from the spec. However, a reason behind not following the spec (which is from 2008) can be valid as well: to avoid expensive opening of editor windows when browsing through an output window with many error messages from various sources (using Ctrl-. and Ctrl-,). It seems to me that for this reason a compromise behavior might have sense to be defined and the spec be updated - the problem with not opening editor windows is in the fact that after the user has reached the message for which she indeed does want to see the source, there is no way how to go to the source by keyboard only (one must click by mouse). Therefore it might be good to consider an additional shortcut, e.g., pressing Enter on a focused error message seems intuitive enough to go to source. However, I better assign this issue to NB UI Steering committee for evaluation.
Comment 4 richgunther 2012-12-04 16:05:12 UTC
For my part, I agree that using an additional required key press to initiate the opening of the relevant editor window makes sense, and a simple "Enter" press seems intuitive.
Comment 5 Jaroslav Havlin 2012-12-10 15:33:21 UTC
http://hg.netbeans.org/core-main/rev/542582a3664c
Fixed.
I've updated http://wiki.netbeans.org/TS_61_OutputWindow, please check it.
Thank you for your help.
Comment 6 Petr Somol 2012-12-10 16:55:07 UTC
(In reply to comment #5)
> http://hg.netbeans.org/core-main/rev/542582a3664c
> Fixed.
> I've updated http://wiki.netbeans.org/TS_61_OutputWindow, please check it.
> Thank you for your help.

Thanks for the fix. As for the spec we should better keep the 6.1 spec as it had been till now for backward reference and create an updated one. I have done that: now the spec can be found at http://wiki.netbeans.org/TS_73_OutputWindow, while the old one is available now in its old form at the aforementioned address.
Comment 7 Petr Somol 2012-12-10 17:03:17 UTC
Sorry for the previous reopening which happened unintentionally together with adding my last comment, it was just a cache mistake in my browser when keeping the form opened for too long.
Comment 8 Quality Engineering 2012-12-12 02:45:09 UTC
Integrated into 'main-golden', will be available in build *201212120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/542582a3664c
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #222548: Output window - Enter invokes OutputListener action