Search This Blog

Saturday, January 17, 2015

Intellij file mask exclude; IntelliJ search files exclude file type; search files exclude file by extension

There is a simple way to exclude files by extension (in fact by using regular expressions on file names in IntelliJ 14 and Android Studio 1.0)

When searching in file content (ctrl+shift+F) limit the scope of search to Custom
and click '...'  to create a new scope.

Shared scopes are stored in: .idea/scopes/
and are shared between team members.


Custom search scope example for Android Annotations:

file:*java&&!file:*R.java*&&!file:*_.java

search in all java source files without R.java files and generated annotations.






http://stackoverflow.com/questions/22143881/how-to-exclude-a-file-extension-from-intellij-idea-search


If you want to include strings.xml etc. use this search pattern:


file:*java&&!file:*R.java*
&&!file:*_.java||file:*strings.xml||file:*dimes.xml||file:*styles.xml||file:*attrs.xml||file:*colors.xml||file:*layout/*xml&&!file:*build/*xml




No comments:

Post a Comment

If you like this post, please leave a comment :)