user2315641
user2315641

Reputation: 171

How to search for a string in my entire project in Eclipse IDE?

I need to find a string, but it is too time-consuming to Ctrl+F every class. Is there a faster way to search the entire project?

Upvotes: 0

Views: 7017

Answers (3)

Moesio
Moesio

Reputation: 3178

You can search for specific string using ctrl + H, choose 'File search' tab.

But if you want search any string, try use a regular expression at 'Containing text' ".+".

If you're trying search string in java code, regular expression above will match strings used at annotations. To avoid this try this one ^\s*?[^@]\w*?".+".*$

Upvotes: 0

Maralc
Maralc

Reputation: 906

Much better than Control+H that may takes ages in Eclipse is to install a full text search plugin like Quick Search from Spring Tools or instaSearch. It will increase your productivity immensely.

Check out this blog post:

http://howtodoinjava.com/2015/04/03/use-eclipse-quick-search-plugin-for-faster-text-searches/

Upvotes: 0

AllTooSir
AllTooSir

Reputation: 49432

  1. Select the String and Control+Alt+G in Eclipse (Windows).
  2. Use the Search Window, to open it Control+H in Eclipse(Windows).

Upvotes: 3

Related Questions