在Android Studio中搜索整个项目中所有出现的字符串 [英] Search all the occurrences of a string in the entire project in Android Studio

查看:716
本文介绍了在Android Studio中搜索整个项目中所有出现的字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用Android Studio(IntelliJ),现在我正在查找该功能,以便在项目的任何文件中查找字符串的出现。例如:我想找到包含字符串 .getUuid()的所有文件

I've just started using Android Studio (IntelliJ), and I now look for the feature to find the occurrence of a string in any of the files in my project. For example: I want to find all the files that contain the string ".getUuid()"

搜索在右上方没有给我正确的结果,我不认为我可以在编辑>查找下找到此功能。

The search at the top right doesn't give me the correct results, and I don't think I can find this feature under Edit > Find.

任何人都可以指向我正确的方向?

Could anybody point me at the right direction?

推荐答案

首先,这个IDEA有一个很好的 Find Usages 命令。它可以在上下文菜单中找到,当光标在某个字段,方法等上时。

First of all, this IDEA has a nice "Find Usages" command. It can be found in the context menu, when the cursor is on some field, method, etc.

它是上下文感知的,据我所知,是查找课程,方法或字段用法的最佳方法。

It's context-aware, and as far as I know, is the best way to find class, method or field usage.

或者,您可以使用


编辑>查找>在路径中查找...

Edit > Find > Find in path…

对话框,可让您搜索整个工作区。

dialog, which allows you to search the whole workspace.

同样在IDEA 13中有一个很棒的 Search Everywhere 选项,默认情况下由double调用转移。它允许您搜索项目,文件,类,设置等。

Also in IDEA 13 there is an awesome "Search Everywhere" option, by default called by double Shift. It allows you to search in project, files, classes, settings, and so on.

您还可以使用查找项目结构对话框进行搜索在路径...... 。只需在具体目录上通过鼠标右键调用它,搜索范围将只在该目录及其子目录中。

Also you can search from Project Structure dialog with "Find in Path…". Just call it by right mouse button on concrete directory and the search will be scoped, only inside that directory and it's sub-directory.

享受!

这篇关于在Android Studio中搜索整个项目中所有出现的字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆