Bug 563977 - [Quicksearch] Include files in hidden folders
Summary: [Quicksearch] Include files in hidden folders
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.16   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks:
 
Reported: 2020-06-05 05:39 EDT by Julian Ruppel CLA
Modified: 2021-04-27 17:36 EDT (History)
4 users (show)

See Also:


Attachments
text in file of hidden folder not found (231.44 KB, image/png)
2020-06-05 05:39 EDT, Julian Ruppel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Ruppel CLA 2020-06-05 05:39:21 EDT
Created attachment 283175 [details]
text in file of hidden folder not found

Apparently Quick Search does not consider files in a hidden folder (.github for instance) which is quite unfortunate. 

I am not sure if this is a bug or a new requirement. Nevertheless, it would be helpfull to be able to find hidden files, too.

Probably a checkbox in the Preferences page would be nice to control if hidden files should be taken into account or not.
Comment 1 Paul Pazderski CLA 2020-06-05 06:55:48 EDT
Apparently the IContainer.members() call in ResourceWalker does not include hidden members. Since excluding hidden members is even recommended in one of the Javadocs I wouldn't count this as bug.

Apart from the Preference page another good place to add such an include hidden option is the Quick Search Dialog's view menu along with the case sensitivity and 'keep open'.
Comment 2 Julian Ruppel CLA 2020-06-05 09:06:36 EDT
(In reply to Paul Pazderski from comment #1)
> Apart from the Preference page another good place to add such an include
> hidden option is the Quick Search Dialog's view menu along with the case
> sensitivity and 'keep open'.

Indeed, good point.
Comment 3 Mickael Istria CLA 2020-09-17 04:35:09 EDT
Do you have any idea why this folder is marked as hidden by default? I don't see a compelling reason why this should be the case.
Comment 4 Nitin Dahyabhai CLA 2020-09-17 04:39:23 EDT
Is it actually hidden at the file system level, or just marked as Team Private )through eGit possibly)?
Comment 5 Paul Pazderski CLA 2020-09-17 06:24:22 EDT
This is actually a bit more complicated as I thought before.

A short test on Windows on what is at the moment considered hidden:
 - a normal file -> not hidden, quicksearch finds matches
 - a file with file attribute hidden -> not hidden in eclipse, quicksearch finds matches
 - a normal file starting with a dot -> hidden in eclipse, quicksearch does not find matches

So the handling of hidden files is already a bit weird and my first guess that ResourceWalker filter out the hidden files was wrong.
It is actually the default "Ignored Prefixes" setting which filter any file starting with a dot.
Comment 6 Julian Ruppel CLA 2021-04-24 13:53:53 EDT
Thanks, Paul Pazderski, for sharing your insights.

I was referring to your 3rd case:
> a normal file starting with a dot -> hidden in eclipse, quicksearch does 
> not find matches

I totally missed the "." in "Ignored Prefixes" preferences. Once I deleted it, quicksearch does find the matches properly.

So it is more of a usability glitch than a bug.

Since a dot makes files effectively hidden in eclipse, I would like to propose to remove the default dot from the "Ignored Prefixes" preferences and instead, as you mentioned already, add an "include hidden dotfiles" option in the Quick Search Dialog's view menu to make the option more obvious.
Comment 7 Mickael Istria CLA 2021-04-26 06:09:38 EDT
A good solution could be to make QuickSearch able to leverage the filtering definitions of the Project Explorer for a consistent experience.
Comment 8 Julian Ruppel CLA 2021-04-27 17:36:23 EDT
Actually, I am not sure since you could have both the Package Explorer and the Project Explorer with different filter settings in parallel open. Which setting would be the leading then for Quick Search?
IMHO this could be confusing.