In Eclipse, in the package explorer, can I find files by name?
EclipseEclipse Problem Overview
You know how in Eclipse's Preferences window (menu bar: Window --> Preferences), you have a hierarchy to browse, but you also have a text search field. And as you type into that search field, the hierarchy is filtered to show only entries matching what you typed?
I would love to see the same feature in the Package Explorer tab. I have 100s of files in my Package Explorer hierarchy. Oftentimes I just want to type in a partial name, and see only those matching entries.
Does this feature exist? Something related, that would accomplish the same goal? (search, not browse)?
Thanks
Eclipse Solutions
Solution 1 - Eclipse
You can do the opposite of what you want to do. Click on the white arrow on the right of the package explorer, select Filters...
and type an expression with wildcards. Eclipse will not show the resources matching this pattern.
You can search for types in your workspace with the shortcut Ctrl+Shift+T or for files in general with Ctrl+Shift+R. You can specify a pattern in the same way you can do for filters.
Solution 2 - Eclipse
Ctrl+Shift+R
Type only partial name in the text field to find your file.
Solution 3 - Eclipse
There is a small button with "left right arrows" (link with editor) near Package Explorer. Click that and you can use Ctrl+Shift+R with it. It will show you the current open file in Package Explorer.
Solution 4 - Eclipse
I'm not quite sure if this is what you're looking for... but try ctrl + shift + r
Solution 5 - Eclipse
As others have mentioned, ctrl + shift + r works nicely if you have thousands of files in your project.
Also, I would like to add the following: you can add additional folder into the existing project by the following sequence: File, new, folder. In the pop-up window, select Advanced, select Link to alternate location (Linked Folder), Browse...
To add new file, just do: File, new, source file
After you added the additional file or folder, then at the project root, hit F5 to refresh the project so that the new file and the new folder will be brought into the project.
And then you can use ctrl + shift + r to also find the newly added file of the newly added folders.
Solution 6 - Eclipse
Simple. Just press Ctrl + H (Windows),
this will open up the Advanced Search window.
Go to File Search tab and type in the required parameters:
The above example showcases me trying to search for all occurrences of .xml
files within a specific folder