问题
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?
Note that the second uses &&!file:R.java
, yet the scope does not contain fewer files.
回答1:
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
:
Note that the second uses &&!file:*/R.java
, and the scope contains fewer files.
来源:https://stackoverflow.com/questions/29682656/how-do-i-write-a-custom-search-filter-to-weed-out-r-java-files