简体   繁体   中英

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

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

在此处输入图片说明

Follow these steps to directly achieve the goal:

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

在此处输入图片说明

2. Click on ... options button:

在此处输入图片说明

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

在此处输入图片说明

4. Choose a name for it and press OK :

在此处输入图片说明

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

在此处输入图片说明

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

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM