Community
Participate
Working Groups
The Quick Search (Ctrl+Alt+Shift+L) skips searching the rest of a particular file contents at the first line with more than 1000 symbols. This causes incorrect/inconsistent search results, while at the same time the search completes normally. -- Configuration Details -- Product: Eclipse IDE 4.14.0.20191212-1200 (org.eclipse.epp.package.jee.product)Installed Features: org.eclipse.platform 4.14.0.v20191210-0610
Hello Tsvetan, sorry that no one had reacted to your bug earlier. What you see works (mostly) as intended. Quick search is not a replacement for the regular search. While I can imagine cases where it is useful to see 1000 and more results, in general the simple quick search dialog is not the optimal place to check such large result sets. One part which can be counted as bug is that you even see 1000 results. It is normally limited to 200 results but does not suspend search in the middle of a file at the moment. What the quick search dialog is missing is a way to distinct if the search was stopped because all files are searched or the limit of search results is reached.
Hi Paul, I think that the current title of the ticket does not correspond to what I observed and reported back in March 2020. It's not about the number of results, but the number of characters at a single line within a file. I observed this with a text file that had a very long line (1024 characters) and the lines after contained some regular looking code (less than 100 characters per line). What I reported is that when the quick search parses the file and it meets a long line (1000+ characters), it simply ignores the rest of the file, where the code that matches my search pattern actually was. Looking at the code without line wrapping, the file looked just like any other code file and at first I just couldn't understand why the quick search was not showing it to me in the results. The whole file was like 80 lines. So I noticed that one of the lines was very long and experimentally found that if I reduce its length below 1000 characters, then the Quick search finds the matches in the lines below, otherwise it just ignored all the code below that long line.
You are absolute right. I misinterpreted your request. I opened bug 567062 instead for my "to much results" complain. But what I said before still applies: "What you see works as intended". The original author added this length limitation in order to automatically guess what is an automatic generated file (i.e. minified Javascript) and could be excluded from search. The limit can be changed in Preference -> General -> Quick Search. As said, quick search is not a full replacement for the regular search but if you got an idea to improve this situation without fully removing this feature feel free to share.
Thank you for the good explanation, Paul! If I remember correctly, in my case the 1000+ characters line was a very long string value or comment that caused me some pain. I guess this feature could be a good prank for Eclipse newbies.
To make the semantic of the Max Line Lenght field in preference at least a bit more comprehensible, a FieldDecorationRegistry.DEC_INFORMATION could give more information about the behavior (which is stoping the search process for this file). What do you think?
Another idea to work around this intended behavior would be to extend the preferences in a way that a list of files/filetypes can be configured as exceptions from the max line length limit. So if I know that I have certain files that have long lines but I want them to be included in the search, I could add them there in this allow-list.
*** Bug 567925 has been marked as a duplicate of this bug. ***