Eclipse 替换所有类中的文本?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3376440/
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
Eclipse Replace text in all Classes?
提问by Ian Vink
Is there a command to replace a string of code with another in all .java files in an Eclipse project?
在 Eclipse 项目的所有 .java 文件中,是否有命令将一串代码替换为另一个代码?
In Visual Studio there is a "Replace in all files" option that I can't seem to find in Eclipse.
在 Visual Studio 中,我似乎在 Eclipse 中找不到“替换所有文件”选项。
回答by walterbing1
Press Ctrl+Hor look in the Search menu for Search>Search or Search>File depending on version. At bottom of dialog box, click Replace... There you'll find the replace in files functionality.
按Ctrl+H或在“搜索”菜单中查找“搜索”>“搜索”或“搜索”>“文件”,具体取决于版本。在对话框底部,单击替换...在那里您将找到文件中的替换功能。
回答by Rajesh D
回答by Chinmoy
回答by Gopi
I don't know about command but just press 'ctrl+h' the dialog that appears woulh have what you need
我不知道命令,但只需按 'ctrl+h' 出现的对话框就会有你需要的东西
回答by Shubham Pai
Select the word and press alt+shift+rthen replace the word, it should reflect in all classes.
选择单词并按 alt+shift+r然后替换单词,它应该反映在所有类中。