如何编写自定义搜索过滤器来清除 R.java 文件? [英] How do I write a custom search filter to weed out R.java files?

查看:26
本文介绍了如何编写自定义搜索过滤器来清除 R.java 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建自定义搜索 à la 如何从 IntelliJ IDEA 搜索中排除文件扩展名? 在 Android Studio 中.为什么下面的模式不排除 R.java 文件?

I'm trying to create a custom search à la How to exclude a file extension from IntelliJ IDEA search? in Android Studio. How come the following pattern doesn't exclude R.java files?

请注意,第二个使用 &&!file:R.java,但范围不包含更少的文件.

Note that the second uses &&!file:R.java, yet the scope does not contain fewer files.

推荐答案

问题是必须考虑到文件的路径.!file:R.java 仅在根目录中查找 R.java.要查找所有 R.Java 文件,必须使用 !file:*/R.java:

The issue is that one must take into account the path of the file. !file:R.java looks only for R.java in the root. To look for all R.Java files, one must use !file:*/R.java:

注意,第二个使用&&!file:*/R.java,并且范围包含较少的文件.

Note that the second uses &&!file:*/R.java, and the scope contains fewer files.

这篇关于如何编写自定义搜索过滤器来清除 R.java 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆