Skip to content

File search incorrectly reports shown matches (shown file count vs shown match count) #3720

@bremk42-sys

Description

@bremk42-sys

Let's make sure issue is not already fixed in latest builds first.

  • I looked at the source code of the master branch (FileSearchPage.java) and the code seams to be identical to the code in my Eclipse 4.35 installation.

Steps to reproduce

Create a text file with the following 3 lines:
ABC
ABCBC
ABCDCDC

Then do a file search on the file and search for "A". The label of the search view says "3 matches in ..." OK
Then repeat the search and search for "B". The label of the search view says "4 matches in ... (showing 3 of 4 matches)" which is NOT OK because all matches are shown.
If you search for "C" the label will be "6 matches in ... (showing 3 of 6 matches)" which is also NOT OK.

Since all matches are shown in the search view the view should not report not shown matches.

Locking at the source code of the label generation in FileSearchPage.getLabel() the problem seams to be an incorrect comparison of lines (leaves in the tree) and matches in the first if branch that generates this label extension.

Tested under this environment:

  • OS & version: Windows 11
  • Eclipse IDE/Platform version (as shown in Help > About): 4.35

Community

  • I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions