Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse - how to get count of word being searched?

Tags:

find

eclipse

I am surprised to see that I am not able to check the number of occurrences of word I am trying to find. For just this one feature I need to switch to Notepad++ to do a find and check the count.

I tried to google, and search most of the locations on internet as far as I know, but didn't find anything. Have anyone encountered this issue? Any workaround? Or am I missing some basic hidden config in the eclipse world of preferences?

Note: I am aware of the highlight all feature, but I am interested in count of a word, e.g. Number of occurrences of word MyArray.

Also, no such feature in console output as well.

like image 578
mtk Avatar asked Feb 16 '15 14:02

mtk


People also ask

How do I select all occurrences of a word in eclipse?

Ctrl + shift + a finds 'occurances in a file' that highlights all occurances of the selected text as you describe.

How do I see usage in eclipse?

Press Ctrl + Shift + G.

How do I search all in eclipse?

Shortcut commands in Eclipse IDE : CTRL + SHIFT + T –> used to search all Java type files (Open Type) CTRL + SHIFT + R –> used to search all types of files (Open Resource) CTRL + H –> opens dialog box which provides number of options (Search)


2 Answers

Highlight any string and hit Ctrl+Shift+U. It will give the occurrence in the Search window.

like image 140
rohitgattani Avatar answered Sep 18 '22 18:09

rohitgattani


Find and Replace the same word so it will not be changed, and then press "Replace All". On the bottom of the search window you will see "xxx matches replaced". You also can Replace All and then revert the changes, when you missed it to set the "Replace with" field.

like image 41
Gerry Avatar answered Sep 17 '22 18:09

Gerry