Improve goto/jumpto search windows#8896
Conversation
4369b9e to
b6818ce
Compare
matthiasblaesing
left a comment
There was a problem hiding this comment.
Only eyeballed, but looks sane to me. Thank you.
- make exact search mode follow the case sensitivity settings - add missing exact search instructions to file search label (other windows had those) - file search: selection should stick to first item until user changes selection. Async search could otherwise insert better matches above the selected item - disable "prefer opened projects" by default - CI: enabled tests - other minor improvements the "prefer opened projects" setting can lead to confusing results when good matches are displayed far away from the first (worse) match, potentially outside of the visible viewport. The implementation itself works correctly but it might be better to change it into a filter instead of model comparator in future and consolidate the UI/settings of the 3 search dialogs.
- removed the setting from global options and moved it to the three search windows - generics and related language renovationss - file search: renamed "Search by Folder" to "Search by Path" - updated mnemonics
|
thanks, rebasing and merging after some more manual tests |
b6818ce to
7d9ed0e
Compare
|
Thank you! I remember there were various problems with "Go to Symbol" at some point, which made me use "Go to File" only for several years. I will see if Go to Symbol starts becoming useful again after these tweaks (and now that there has been another few years of other NetBeans updates as well). |
|
@eirikbakke there are a few more things wanted to try but left it for later. E.g would be good to consolidate features between all 3 dialogs. NB is hit by a severe case of code duplication in several areas which caused the goto feature too to get out of sync between the 3 dialogs. We could even consider making that one dialog which can switch between 3 modes, (hotkeys would still open the right mode so that usage would not be influenced). Tweaking the comparators is also an option, but before doing that we have to define what we want from the "prefer x" stages - maybe it should be a simple filter and not implemented in the comparator. |
|
@mbien One of the main problems for me was that Go to Symbol sometimes omits symbols that should be present. I started debugging this a long while back, and concluded it was probably a race condition in the UI code, rather than a problem with the symbol index. (The right symbols appeared when I did System.out.println statements, but they never appeared in the UI list.) Indeed looking at the UI code for Go to Symbol it looked very complex, and I ran out of time to investigate it. |
|
I finally got around to investigating the "missing classes in Go to Symbol" problems I described earlier. Here's a PR that fixes them: #9327 The problem was not a race condition in the UI code, but rather a mis-configured ".sig" file reader which failed when trying to load index data for Java classes with certain (quite common) features in them. |
This is about the goto/jumpto dialogs which open with
ctrl+O,alt+shift+Oandctrl+alt+shift+Ofirst commit:
'list '(note the space postfix) will now also show'List'among the results when case sensitivity is disabled)the "prefer opened projects" setting can lead to confusing results when good matches are displayed far away from the first (worse) match, potentially outside of the visible viewport. The implementation itself works correctly but it might be better as toggle in the search window settings instead of the more hidden global options. When a user clicks on it, at least he/she is aware that it is enabled.
second commit:
(other two windows look similar, but they may have less options)
fixes #4311
https://issues.apache.org/jira/browse/NETBEANS-3808
https://issues.apache.org/jira/browse/NETBEANS-3017