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 246161

Summary: Go To File/Symbol/Type is refreshing the whole list.
Product: utilities Reporter: Christian Lenz <chrizzly>
Component: Jump ToAssignee: Tomas Zezula <tzezula>
Status: RESOLVED FIXED    
Severity: normal CC: markiewb
Priority: P3    
Version: 8.0.1   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Go to file
Eclipse go to resource
Eclipse go to type
Netbeans go to file
Netbeans go to type

Description Christian Lenz 2014-07-31 10:54:55 UTC
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.


Regards

Chris
Comment 1 Tomas Zezula 2015-03-30 13:22:53 UTC
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.
Comment 2 Christian Lenz 2015-03-30 14:51:51 UTC
Can you give me the link to the diff? I'm interested to see what you've changed. Thx.
Comment 3 Tomas Zezula 2015-03-30 16:19:52 UTC
Here it is:
http://hg.netbeans.org/jet-main/rev/b958ff747b26


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.
Comment 4 Tomas Zezula 2015-03-31 14:22:08 UTC
I've created the issue for filtering of Go To Type, issue #251532.
Comment 5 Christian Lenz 2015-03-31 14:57:38 UTC
Great, Thx.
Comment 6 Tomas Zezula 2015-03-31 15:47:18 UTC
Finally the Go To Symbol issue #251535.
Comment 7 Tomas Zezula 2015-03-31 15:47:37 UTC
Thanks for the report.
-- Tomas
Comment 8 Quality Engineering 2015-04-03 03:07:37 UTC
Integrated into 'main-silver', will be available in build *201504030001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/b958ff747b26
User: Tomas Zezula <tzezula@netbeans.org>
Log: #246161:Go To File is refreshing the whole list.
Comment 9 Christian Lenz 2015-11-24 09:25:06 UTC
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.


Regards

Chris
Comment 10 Christian Lenz 2015-11-24 09:25:45 UTC
Created attachment 157469 [details]
Eclipse go to resource
Comment 11 Christian Lenz 2015-11-24 09:26:19 UTC
Created attachment 157470 [details]
Eclipse go to type
Comment 12 Christian Lenz 2015-11-24 09:26:55 UTC
Created attachment 157471 [details]
Netbeans go to file
Comment 13 Christian Lenz 2015-11-24 09:28:19 UTC
Created attachment 157472 [details]
Netbeans go to type
Comment 14 Christian Lenz 2016-02-25 09:07:35 UTC
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.
Comment 15 Tomas Zezula 2016-02-28 09:05:25 UTC
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.
Comment 16 Tomas Zezula 2016-02-28 15:47:22 UTC
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.
Comment 17 Christian Lenz 2016-02-29 07:22:22 UTC
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.


Cheers

Chrus
Comment 18 Tomas Zezula 2016-02-29 09:38:59 UTC
Fixed for GT Type/ GT Symbol f2d078c6c220.
Comment 19 Quality Engineering 2016-03-01 02:19:08 UTC
Integrated into 'main-silver', will be available in build *201603010002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/9c30d893324d
User: Tomas Zezula <tzezula@netbeans.org>
Log: #246161:Go To File/Symbol/Type is refreshing the whole list.