在 Eclipse 中查找和替换文本

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6029118/
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-19 16:18:47  来源:igfitidea点击:

Find and Replace text in Eclipse

eclipsereplace

提问by user753527

I am using eclipse IDE.I need to modify thousands of hbm.xmlfile by replacing the text generate="always"to generate="never". Please tell me the easiest way.

我正在使用 Eclipse IDE。我需要通过将文本generate="always"替换为generate="never"来修改数千个hbm.xml文件。请告诉我最简单的方法。

回答by Jon Skeet

Click on the "Search" button, click on the "File Search" tab, set the filename to hbm.xml, set the text to generate="always"and click on the "Replace" button at the bottom. When it's search for all matches, it'll offer you another dialog to say what to replace it with.

单击“搜索”按钮,单击“文件搜索”选项卡,将文件名hbm.xml设置为,将文本设置为generate="always",然后单击底部的“替换”按钮。当它搜索所有匹配项时,它会为您提供另一个对话框来说明替换它的内容。

回答by Andreas Dolk

The eclipse search dialogs offer a globalfind and replace in text files.

eclipse 搜索对话框提供了文本文件中的全局查找和替换。