eclipse 在eclipse中跨工作区查找/替换
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1876664/
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
Find/replace across workspace in eclipse
提问by Viral Shah
Possible Duplicate:
Eclipse Replace text in all Classes?
可能的重复:
Eclipse 替换所有类中的文本?
I want to replace all instances of Foo.bar() with Foo across all files in my workspace in eclipse. Is there a way of doing this?
我想在 Eclipse 中的工作区中的所有文件中用 Foo 替换 Foo.bar() 的所有实例。有没有办法做到这一点?
回答by Malaxeur
When you do a text-based search in eclipse (using the flashlight button at the top of the screen and selecting the right tab) there's a "Replace..." button at the bottom of the dialog. Press that, instead of search, and you can do a global find and replace.
当您在 eclipse 中进行基于文本的搜索时(使用屏幕顶部的手电筒按钮并选择正确的选项卡),对话框底部有一个“替换...”按钮。按那个,而不是搜索,你可以进行全局查找和替换。
Alternatively, you can use the refactoring feature to change it to something else.
或者,您可以使用重构功能将其更改为其他内容。