Search all the occurrences of a string in the enti

2019-01-20 21:40发布

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?

9条回答
Ridiculous、
2楼-- · 2019-01-20 21:44

Press Shift twice and a Search Everywhere dialog will appear.

查看更多
一夜七次
3楼-- · 2019-01-20 21:49

Use Ctrl + Shift + F combination for Windows and Linux to search everywhere, it shows preview also.

Use Ctrl + F combination for Windows and Linux to search in current file.

Use Shift + Shift (Double Tap Shift) combination for Windows and Linux to search Project File of Project.

查看更多
手持菜刀,她持情操
4楼-- · 2019-01-20 21:53

And for all of us who use Eclipse keymaps the shortcut is Ctrl+H. Expect limited options compared to eclipse or you will be disappointed.

查看更多
乱世女痞
5楼-- · 2019-01-20 21:55

In Android Studio on a Windows or Linux based machine use shortcut Ctrl + Shift + F to search any string in whole project. It's easy to remember considering Ctrl + F is used to search in the current file. So just press the Shift as well.

On OSX use the Command key instead of Ctrl

查看更多
狗以群分
6楼-- · 2019-01-20 22:00

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.

Alternatively, you can use the

Edit > Find > Find in path…

dialog, which allows you to search the whole workspace.

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.

Enjoy!

查看更多
可以哭但决不认输i
7楼-- · 2019-01-20 22:00

What you want to reach is that, I believe:

  • cmd + O for classes.
  • cmd + shift + O for files.
  • cmd + alt + O for symbols. "wonderful shortcut!"

Besides shift + cmd + f for find in path && double shift to search anywhere. Play with those and you will know what satisfy your need.

查看更多
登录 后发表回答