How can I exclude auto-generation code when I search text in Android Studio?

Viewed 162

I search text in Android Studio, you can see Image A

I find the search result includes auto-generation code such as LayoutHomeBindingImpl

I hope to exclude search result from auto-generation code, how can I do?

Image A

enter image description here

1 Answers

Follow these steps to directly achieve the goal:

1. Press Ctrl + Shift + F to open Find in Path window, then go to Scope tab:

enter image description here

2. Click on ... options button:

enter image description here

3. Click on + then Local to add a new scope:

enter image description here

4. Choose a name for it and press OK:

enter image description here

5. In Pattern box, put !file:*/generated//*, then press Apply and OK:

enter image description here

6. Now, all generated source codes are excluded in the result of Find in Path:

enter image description here

Related