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 181468

Summary: New watch dialog does not close on enter
Product: debugger Reporter: Egor Ushakov <gorrus>
Component: CodeAssignee: Martin Entlicher <mentlicher>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Egor Ushakov 2010-03-03 05:17:58 UTC
Now in new watch dialog enter just do line break, not closes the window (OK) like it was before. Looks like a regression.
Comment 1 Martin Entlicher 2010-03-08 09:34:51 UTC
I can reproduce this only when there is no selected file in Editor. In that case some default text editor kit is used. As soon as I select e.g. a Java file, the Enter works correctly.
Comment 2 Egor Ushakov 2010-03-09 05:13:04 UTC
Not necessary.
Steps to reproduce:
- have several java files opened
- in projects view select project or package (not a java file) and leave focus there
- after that new watch action issued from main menu or from variables tab will have no code completion and will not close on enter

And there are many more cases when getMostRecentFile will return something without EditorCookie.
Comment 3 Martin Entlicher 2010-03-10 09:52:38 UTC
Can be fixed by:
        KeyStroke enterKs = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0);
        editorPane.getInputMap().put(enterKs, "none");
I'll put this into Utilities.createScrollableLineEditor() after issue #181523 is implemented.
Comment 4 Martin Entlicher 2010-03-16 15:59:42 UTC
I've fixed it for now in changeset: 163730:607cb2fb7859, until issue #181523 is resolved.
http://hg.netbeans.org/main/rev/607cb2fb7859