netbeans
netbeans copied to clipboard
Improve quick search behavior in OutlineView, TreeTable, and ListView
Quick search is the little search bar that pops up when you start typing in various NetBeans explorer view components:
This PR unifies the search bar behavior in OutlineView, TreeTable, and ListView, with some adjustments and bug fixes. Mostly the search bar should work like a search bar in any other app, e.g. Chrome. Some common alternative keystrokes are handled for Find Next/Previous.
Details:
- For OutlineView and TreeTable, avoid changing the selection when pressing Escape. (TreeView already has the desired behavior.)
- Add F3 and Ctrl/Command+G as alternative keystrokes for next-match (and Shift variants for previous-match).
- Have QuickSearch select all when invoking Ctrl+F or alternative shortcuts while the search bar is already open.
- Make the ListView's quick search box look more modern, and consistent with that of OutlineView/TreeView. Use the magnifying glass icon instead of the text 'Search', and use a flat border style. Note that ListView has a "floating" search bar instead of one attached to the bottom of the box; I have not changed this.
-
- Add more alternative find-next/previous keystrokes for ListView, like I did in the QuickSearch class (which is used by TreeView and OutlineView but not ListView). On Ctrl+F or F3, open the search bar, or select-all the existing text if it is already open.
- In OutlineView and TreeTable, avoid backtracking to the first hit if backspace is pressed on a still-matching selection.
moving to NB29