简体   繁体   English

在 Android Studio 中搜索文本时如何排除自动生成代码?

[英]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我在 Android Studio 中搜索文本,您可以看到图像 A

I find the search result includes auto-generation code such as LayoutHomeBindingImpl我发现搜索结果包括自动生成代码,例如LayoutHomeBindingImpl

I hope to exclude search result from auto-generation code, how can I do?我希望从自动生成代码中排除搜索结果,我该怎么做?

Image A图片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: 1.Ctrl + Shift + F打开Find in Path窗口,然后转到Scope选项卡:

在此处输入图片说明

2. Click on ... options button: 2.点击...选项按钮:

在此处输入图片说明

3. Click on + then Local to add a new scope: 3.单击+然后单击Local添加新范围:

在此处输入图片说明

4. Choose a name for it and press OK : 4.为它选择一个名称,然后按OK

在此处输入图片说明

5. In Pattern box, put !file:*/generated//* , then press Apply and OK : 5.Pattern框中,输入!file:*/generated//* ,然后按ApplyOK

在此处输入图片说明

6. Now, all generated source codes are excluded in the result of Find in Path : 6.现在,所有生成的源代码都被排除在Find in Path的结果中:

在此处输入图片说明

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Android Studio中的代码中为Textview文本设置粗体 - How I can set Bold for Textview text in code in android studio 在自动完成文本视图中输入文本并在android中将其清除后,如何清除其他文本视图中的文本? - How can I clear text in another text view when I have entered text in auto complete text view and cleared it in android? 我如何在 Java 中查看 Android Studio 的自动属性建议 - How I can see Auto Attribute suggestion for Android Studio in Java 使用Android Studio时如何获取Android库的源代码? - How can I get source code of Android Library when using Android Studio? 我如何使用TextWatcher在Android Studio数据库中进行搜索 - how can i search in android studio database with textwatcher 我可以在Android Studio中按名称搜索软件包吗 - Can I search package by name in Android Studio 我如何将Android代码导出到Android Studio中的Java库 - How i can export Android code to java library in Android Studio 在 Android Studio 中使用 Room 搜索记录时,如何显示 Loading UI based different complex? - How can I display Loading UI based different complex when I search records using Room in Android Studio? 当文本部分为空白并且按下按钮时(在 android 工作室中),如何显示 toast 消息? - how can I show toast message when text section is blank and the button gets pressed (in android studio)? 如何使用lint.xml从Android Studio中的lint中排除一些未使用的图像? - How can I exclude some unused images from lint in Android Studio using the lint.xml?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM