在 Eclipse 中搜索包含文本“querystring”的项目中的所有文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2602114/
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
Search for all files in project containing the text 'querystring' in Eclipse
提问by Saif Bechan
I work in Dreamweaver and Eclipse when developing. I think Dreamweaver has a really nice search where you can search for text within all files of your current project.
我在开发时使用 Dreamweaver 和 Eclipse。我认为 Dreamweaver 有一个非常好的搜索功能,您可以在其中搜索当前项目的所有文件中的文本。
This is handy when you want to remove a function that is called in a lot of files. You can just search within the current local project. You can choose whether to search within text or in the source code.
当您想要删除在大量文件中调用的函数时,这很方便。您可以只在当前本地项目中搜索。您可以选择是在文本中搜索还是在源代码中搜索。
Does Eclipse have such a feature to find all files that have the word 'querystring' in them?
Eclipse 是否具有查找所有包含“querystring”一词的文件的功能?
回答by Chris Dennett
Yes, you can do this quite easily. Click on your project in the project explorer or Navigator, go to the Search menu at the top, click File..., input your search string, and make sure that 'Selected Resources' or 'Enclosing Projects' is selected, then hit search. The alternative way to open the window is with Ctrl-H. This may depend on your keyboard accelerator configuration.
是的,你可以很容易地做到这一点。在项目资源管理器或导航器中单击您的项目,转到顶部的搜索菜单,单击文件...,输入您的搜索字符串,并确保选择了“选定资源”或“封闭项目”,然后点击搜索. 打开窗口的另一种方法是使用 Ctrl-H。这可能取决于您的键盘加速器配置。
More details: http://www.ehow.com/how_4742705_file-eclipse.htmland http://www.avajava.com/tutorials/lessons/how-do-i-do-a-find-and-replace-in-multiple-files-in-eclipse.html
更多详情:http: //www.ehow.com/how_4742705_file-eclipse.html和http://www.avajava.com/tutorials/lessons/how-do-i-do-a-find-and-replace-in -multiple-files-in-eclipse.html
(source: avajava.com)
(来源:avajava.com)
回答by shiluka
press Ctrl+ H. Then choose "File Search" tab.
按Ctrl+ H。然后选择“文件搜索”选项卡。
additional search options
其他搜索选项
search for resources: Ctrl+ Shift+ R
搜索资源:Ctrl+ Shift+R
search for Java types: Ctrl+ Shift+ T
搜索Java类型:Ctrl+ Shift+T
回答by cesarggf
Ctrl+shift+L opens the Quick text search window
Ctrl+shift+L 打开快速文本搜索窗口
回答by Ry.xn
Just noticed that quick search has been included into eclipse 4.13 as a built-in function by typing Ctrl+Alt+Shift+L (or Cmd+Alt+Shift+L on Mac)
刚刚注意到,通过键入 Ctrl+Alt+Shift+L(或 Mac 上的 Cmd+Alt+Shift+L),快速搜索已作为内置功能包含在 Eclipse 4.13 中
https://www.eclipse.org/eclipse/news/4.13/platform.php#quick-text-search
https://www.eclipse.org/eclipse/news/4.13/platform.php#quick-text-search