有没有办法在 Eclipse 中的整个项目中查找/替换?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3426049/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 19:33:18  来源:igfitidea点击:

Is there a way to find/replace across an entire project in Eclipse?

eclipseprojectreplace

提问by froadie

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.)

我正在尝试在 Eclipse 项目中查找和替换许多文件,但我似乎无法找到一种方法来做到这一点。谷歌搜索告诉我有插件可以实现这一点,但是 Eclipse 中是否有任何内置功能?(这似乎是一项非常基本的任务;让我感到惊讶的是我找不到一种方法来做到这一点。)

回答by nos

Search->Filemenu (also accessible using Ctrl+H, then navigate to Filetab), enter the text to search for, hit the Replace...button which will give you another dialog where you can replace text.

Search->File菜单(也可以使用 访问Ctrl+H,然后导航到File选项卡),输入要搜索的文本,点击Replace...按钮,这将为您提供另一个对话框,您可以在其中替换文本。