I'm trying to do a find and replace over many files within an Eclipse project, but I can't seem to find a way to do it. Googling showed me that there are plug-ins that can accomplish this, but is there any built-in functionality in Eclipse? (It seems to be a pretty basic task; it's surprising me that I can't find a way to do it.)
1 Answer
Search->File
menu (also accessible using Ctrl+H
, then navigate to File
tab), enter the text to search for, hit the Replace...
button which will give you another dialog where you can replace text.
-
28
-
2Does anyone know of a way to make searching across the current project the default when opening the search dialog? I constantly find myself opening the dialog, only to have to close it again, then go right-click on the project and do search from there (then make sure "selected resource" is selected in the dialog box). Apr 27, 2012 at 11:22
-
1@LihO it works fine. In File Search, enter the text in
containing text
. ForFile name patterns
put "*", then hitreplace
and type in the text you want to replace with Nov 9, 2014 at 16:52 -
got a Multiple annotations found at this line: - The content of element type "property" must match "null". - Attribute "type" must be declared for element type Aug 5, 2015 at 16:47
-
Take care when you are working with Subversion system which puts the repository in the same directory. Do not forget to exclude the repository from the replace process! Nov 18, 2015 at 16:50