Every time I use Search In Path
in Android Studio, I end up with generated code being returned as the first section of results.
I usually search for something in *.java,*.xml
, and usually investigate the first few results before I realize I'm looking at Generated Code
. Is there a way to omit the generated code results from being returned as part of the result list, while still allowing the search to read all of the *.java and *.xml files in my project?
I have a feeling this is something beyond ridiculously simple, but I just can't find the right button to toggle.
In the same vein, is it possible to ignore generated classes when loading files or types? I keep getting the generated MyClass$$ViewInjector
classes appearing first in open files, and it's just annoying...
Configuring lint checking in Java and XML source files Tip: If you are using Android Studio, you can use the File > Settings > Project Settings > Inspections feature to manage the lint checking to your Java or XML source files.
Add the Search View to the App Bar To add a SearchView widget to the app bar, create a file named res/menu/options_menu. xml in your project and add the following code to the file. This code defines how to create the search item, such as the icon to use and the title of the item.
The way I've been doing to ignore generated classes in advanced search is adding !file:*intermediates*/&&!file:*generated*/&&!lib:*..*
to a new Custom Scope, like this:
14-October-2015 Update: I have improved the pattern by also excluding the !lib:*..*
from the search. Thanks.
I've seen this in IntelliJ, haven't checked in Android Studio. But when you do find in path (via ctrl+shift+F) there's a "File name filter" section in the search popup which has a checkbox called "File masks" which you might be able to filter desired file types.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With