How can I use 'search in path' for Eclipse Mars 2.0 to find a string pattern in either the name of a file and also find a string pattern in the name of a folder?
I have a folder named 'Personal Finance' in a git repo that I primarily use Eclipse to work with. When I search in file for 'Finance' the only search results that show up are in files themselves. Is there a way in Eclipse to search file names and folder names simultaneously?
Do not use Search dialog(Ctrl+H) for this. It searches inside the file content.
Use open resource dialog(Ctrl+Shift+R). In the input pattern text box enter
<Folder/File NamePatter>/
For example:
*handler/
This will list all files which has handler
string in their names and present under the folders which has handler
string in their names.
*handler/*nature
This will list all files which has nature
string in their names and present under the folders which has handler
string in their names.
See this post for more details When typing in Open Resource dialog, is there a way to find files by directory instead of just the file name? also look into this bug and read all comments.
This may not interest to you but have a look on it:
In this blog you can find the details of a plugin which filters resource in package explorer view by name patterns. But now its limited to filter only projects. Go through this bug and this bug
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With