Created attachment 148439 [details]
Go to file
As you can see it in my little cast, after type some characters, the list disappears for a few ms and appears what I expect is what Open File Fast does. The list of items shrink after searching. It's a common behaviour as we have it for google suggest, in sublime text 2, intelliJ IDEA, quick search, code completion and so on. This happens in Go to file/symbol/type and for my opinion it's a little pain in the ass. It seems that the searching happens again, but I hope that NB will search in the list what I already got returned and will not create a new list or smth like that. I don't know, only my opinion.
Fixed jet-main b958ff747b26.
Fixed for go to File. The go to type, symbol are different.
Go To type should be "easy" to do.
Go To symbol will be more problematic.
I will create separate issues for Go To Type, Symbol and link them.
Can you give me the link to the diff? I'm interested to see what you've changed. Thx.
Here it is:
Basically the Models.MutableListModelImpl was updated to support filtering.
The filtering based on text is implemented in AbstractModelFilter.
The CurrentSearch just represents state of running or previous search.
The FileSearchAction was changed to use the filtering.
I've created the issue for filtering of Go To Type, issue #251532.
Finally the Go To Symbol issue #251535.
Thanks for the report.
Integrated into 'main-silver', will be available in build *201504030001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Tomas Zezula <firstname.lastname@example.org>
Log: #246161:Go To File is refreshing the whole list.
It seems that Netbeans sometimes still refreshes the whole list inside Go To File (Screen capturing: Netbeans gp to file). First it worked after some typing and deleting, it's still broken.
I tried Eclipse Go To Resource, what is the equivalent for Go To Files and it looks smoother, no refreshing at all. I tried Go To Type in Eclipse and the same. (Screen capturing: Eclipse go to resource and go to type).
I Netbeans Go To Type everything is fine, it is fast as hell and don't refresh the whole list. (Screen capturing: Netbeans go to type).
Please let me know whether I should create a new ticket for this or not.
Created attachment 157469 [details]
Eclipse go to resource
Created attachment 157470 [details]
Eclipse go to type
Created attachment 157471 [details]
Netbeans go to file
Created attachment 157472 [details]
Netbeans go to type
I reopenend the ticket, as I described it in my comments. If I have to create a new ticket for this, let me knows it.
In fact works as expected (with one small corner case, I will fix it).
The corner case is when you delete everything and retype the query again, but it's rather artificial.
Regarding the refreshes, there are still situations when refresh is needed:
1) Incomplete search - not all providers finished or forced reexecution. In this case the refresh is needed as the active provider may add more content. Filtering in this case does not work.
2) The type of the old "selector" does not match to the type of the new "selector". As an example case sensitive search was switched to non case sensitive search. There are more of these transitions.
3) The old "selector" text is not a prefix of a new "selector" text. For example you execute query with a text "abs". While extending the query to "abst" or "abso" is OK and filtering can be done,removing chars ("ab") or changing it ("aws") needs a reexecution of providers. The reason is that the providers were asked for "abs".
The reason why providers are not asked for "*" and the list does not do just filtering is first CPU performance (non needed items will be created) and also memory performance (some projects are simply so big, that list of symbols does not fit into memory as seen in issue https://netbeans.org/bugzilla/show_bug.cgi?id=251221 where JS completion tried to load all symbols from the index into memory).
Regarding the delete and reenter problem, the complete delete needs to be handled specially.
The empty input fixed for the Go To File, 9c30d893324d.
Now I am working on fix of go to symbol & go to type.
The go to file now tries to keep the old selector for an empty input. When the input is retyped to either match the selector or when the selector is a prefix of an input it's reused.
When you delete or type an input the dialog delays the search to distinguish among typing (incomplete) and complete input. When the dialog determines the input is complete and the selector is not a prefix of input it starts a search. The dialog waits for incomplete input for 0.5s from last character typed, longer delay means complete input and possible search.
I don't know the concept behind that and the parts sounds plausible for me, but all what I want is the same behaviour as in eclipse and there seems no refreshing the whole list. in intelliJ too. Eclipse and IntelliJ can handle a lot of files too, depends of the project type and submodules, what you use. I hope I will not feel the delay, because I want the search while typing the character so on onKeyUp, instantely if it's possible.
Fixed for GT Type/ GT Symbol f2d078c6c220.
Integrated into 'main-silver', will be available in build *201603010002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Tomas Zezula <email@example.com>
Log: #246161:Go To File/Symbol/Type is refreshing the whole list.