0

As you may know, in Eclipse, we could search a text, which could be a field name or a method name, within a project or work-space, by using File Search. The results would be all the places that the text in question appears. Now, the issue is, I need to search for a number, i.e., 12. For example, number 12 has been used as a flag indicator in many places (in different java files) in a project, and I would like to find out all the places that this number is used. Is there a way to do this? I have tried to do the search in the same way as searching key word (File Search), but it did not work. Thank you very much.

bozhao
  • 51
  • 1
  • 4

3 Answers3

1

It is perfectly possible to use the text search for numbers.

Search => File
Containing text: 12
File name patterns: Adjust to *.java
Scope: Workspace - for full search

Should work like a charm! :-)

LastFreeNickname
  • 1,445
  • 10
  • 17
0

Ok..

  1. Type 12 in any file.
  2. select the text (12)
  3. goto Search --> Text --> Project
demongolem
  • 9,474
  • 36
  • 90
  • 105
TheLostMind
  • 35,966
  • 12
  • 68
  • 104
0

Press CTRL+H- A menu pops up.

Select the customize button and in that check File Search field

Then in the File Search tab define as follow -

In Containing Text Field - type whatever you want to search.

In File name patterns field - provide the files you want to search e.g- *.java will search for all java files.

Finally Hit search. Shall give you the files containing the search number

SparkOn
  • 8,806
  • 4
  • 29
  • 34