Eclipse : Searching for a resource based on complete path

If you are a user of eclipse, (Ctrl + SHIFT + R) is one of the most know and used keyboard shortcut. Whenever we want to search for a resource, we type the Regex to filter the results. But sometimes you might want to apply the filter on complete path. Here is a small tip for that purpose.

In my project I have multiple files with same name but under different paths (obviously đŸ˜‰ ). So whenever I want to open a file I have to manually navigate to the file. It was quite frustrating most of the times.

Suppose you want to open “view.jsp” from “details” folder, if you use “*details*view.jsp” wont help. It will apply the regex on filename only. You should use file separators in the regex for this. You need to separate the regex for matching path and regex for matching filename with “/”. For example for the above search you can type : “*language*/view*jsp

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s