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 - Shouldn't EditorRegistry ignore "AsTextField" components?
Summary: Shouldn't EditorRegistry ignore "AsTextField" components?
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Actions/Menu/Toolbar (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks: 216601
  Show dependency tree
 
Reported: 2012-08-13 13:31 UTC by Martin Entlicher
Modified: 2013-03-11 14:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The proposed patch (752 bytes, patch)
2012-08-13 13:31 UTC, Martin Entlicher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.