Eclipse是否有像Xcode的“在项目中查找”功能那样的方法来搜索整个项目中的某些文本?


当前回答

Ctrl + H是最好的方法! 记得在开始搜索之前复制字符串!

其他回答

按Ctrl + H打开搜索,其中包括通过项目、目录等进行搜索的选项。

Ctrl+H在这里非常方便。我主要在当前项目中搜索,而不是在整个工作空间中搜索。要查找当前缓冲区中字符串在整个项目中的所有出现情况,只需选择该字符串,按Ctrl+H并按enter。就这么简单!

Use Resource Filters! Eclipse will restrict the search result using the Resource Filters defined for your project (eg. right click on you project name and select Properties -> Resource -> Resource Filters). So if you keep getting search hits from parts of your project that your not interested in you could make Eclipse skip those by adding a Resource Filter for them. This is especially useful if you have build files or logs or other temporary files that are part of your projects directory structure, but you only want to search amongst the source code. You should also be aware of that files/directories matched for exclusion in the Resource Filters will not show up in the Package Explorer either, so you might not always want this.

可以使用Ctrl + Alt + G在eclipse的工作区中查找所选文本。

OSX:“选项+⌘命令+ G”

是的,但是你需要打开全局搜索面板。 要做到这一点,按下IDE右上角的双筒望远镜图标。

你甚至可以通过函数标识符、方法作用域等来过滤搜索。

有一个非常好的工具“Eclipse Quicksearch”可用。检查Eclipse的SpringSource更新站点,即:http://dist.springsource.com/release/TOOLS/update/e4.6/(您可以尝试使用e4.4或e4.5替换URL的最后一部分)

它可以很好地与Neon Release(4.6.0)一起工作。它为您提供了良好的增量文本搜索与源文件预览。到目前为止还没有问题。

用法: Alt +的“快速搜索命令”打开“快速文本搜索”对话框。您可以选择搜索是否区分大小写。非常好的工具。