我怎样写一个自定义的搜索过滤器来清除R.java文件? [英] How do I write a custom search filter to weed out R.java files?
问题描述
我试图创建点菜自定义搜索<一个href=\"http://stackoverflow.com/questions/22143881/how-to-exclude-a-file-extension-from-intellij-idea-search\">How要排除的文件扩展名从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?
请注意,第二个使用&放大器;&安培;文件:!R.java
,但范围不包含较少的文件
Note that the second uses &&!file:R.java
, yet the scope does not contain fewer files.
推荐答案
这个问题是一个必须考虑的文件的路径。 文件:R.java
仅查找 R.java
根。要查找所有R.Java文件,你必须使用文件:* / 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
:
请注意,第二个使用&放大器;&安培;文件:* / R.java
,以及范围包含较少的文件
Note that the second uses &&!file:*/R.java
, and the scope contains fewer files.
这篇关于我怎样写一个自定义的搜索过滤器来清除R.java文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!