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 216805

Summary: Shouldn't EditorRegistry ignore "AsTextField" components?
Product: editor Reporter: Martin Entlicher <mentlicher>
Component: Actions/Menu/ToolbarAssignee: Miloslav Metelka <mmetelka>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P3    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 216601    
Attachments: The proposed patch

Description Martin Entlicher 2012-08-13 13:31:06 UTC
Created attachment 123051 [details]
The proposed patch

If EditorRegistry ignores components whose getClientProperty("AsTextField") is true, it would make issue #216601 easier to fix.
Also it looks like clients of EditorRegistry do not care about "AsTextField" components, right? The comment in Javadoc says "... to avoid dealing with all the JTextFields etc.", which suggests that the handling of fields that happen to have JEditorPane is unwanted. Is that correct?

Please have a look at the attached patch.
Comment 1 Martin Entlicher 2013-02-20 10:33:50 UTC
Or shouldn't the focus be moved from the find field to the Editor, when the user clicks into the Editor's gutter?
Comment 2 Miloslav Metelka 2013-03-08 10:54:21 UTC
Yes, focusing would help at least when toggling breakpoint by mouse (Ctrl+F8 would probably not work in this case).

IMHO we should probably end up with an extra method in the EditorRegistry since not all the functionality would like to ignore the text fields e.g. completion (there may be completion for search text field).
So e.g. have a boolean ignoreTextFields parameter to EditorRegistry method(s).
Mito, what do you think?
Comment 3 Martin Entlicher 2013-03-11 13:28:11 UTC
IMHO everything would be solved by transferring the focus into the main Editor, when clicking into the gutter.
When I'm in the search field, I doubt that users expect CTRL+F8 to work, since there's no cursor in the editor.

If we have an option like ignoreTextFields, it would work for us as well I suppose.
Comment 4 Milutin Kristofic 2013-03-11 14:16:52 UTC
Issue #216601 is already fixed.