Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search for Folder Name Using Eclipse "Search in File"

Tags:

eclipse

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?

enter image description here

like image 927
Scott Skiles Avatar asked Sep 17 '16 16:09

Scott Skiles


1 Answers

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:

  1. *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.

  2. *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

like image 117
Chandrayya G K Avatar answered Oct 11 '22 18:10

Chandrayya G K