Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search all the occurrences of a string in the entire project in Android Studio

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?

like image 881
kramer65 Avatar asked Nov 27 '13 20:11

kramer65


People also ask

How to find all occurrences of a character in a string?

Write a Java Program to Find All Occurrences of a Character in a String with an example. In this java return all Character Occurrences example, we used the While loop to iterate facStr from start to end. Within that, we used the String charAt (facStr.charAt (i)) function to read characters at each index position.

How to find all occurrences of a substring in Python?

Use the string.count () Function to Find All Occurrences of a Substring in a String in Python The string.count () is an in-built function in Python that returns the quantity or number of occurrences of a substring in a given particular string.

How to return all character occurrences in Java using while loop?

In this java return all Character Occurrences example, we used the While loop to iterate facStr from start to end. Within that, we used the String charAt (facStr.charAt (i)) function to read characters at each index position.

How do you find the location of occurrence of a word?

If ‘t’ is equal to the length of the word then print the location of occurrence of the word. If the word has not occurred before the first whitespace then initialize j=a [i]+1 and go for next index of the white space.


1 Answers

TLDR: ⌃⇧F on MacOS will open "Find in path" dialog.

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!

like image 187
Seagull Avatar answered Sep 21 '22 17:09

Seagull