IntelliJ File mask not working on simple excluding file pattern! Why?

放肆的年华 提交于 2020-01-02 03:24:05

问题


Follows this page https://www.jetbrains.com/help/pycharm/2016.1/find-and-replace-in-path.html?origin=old_help#mask , it should be able to exclude many files using "!" symbol in front of the regular pattern like: *.java, when doing text search inside IntelliJ projects.

On my project, when I fired Ctrl + Shift + F to do text search for string xyz. There's over 100+ results return in both *.ftl and *.java files. I tried to reduce the results on only ftl files by changing the "File mask(s)"-Option to "!*.java" . But it did not work! The result list is empty!

Googling on the excluding file pattern results in creating custom file filters for each particular search, which I don't want to maintain!

Do I miss something here or IntelliJ is just bad on this function (I'm using IntelliJ 15)? With Eclipse, the "File mask" was amazing!


回答1:


You have to use !*.java instead of !.java




回答2:


Excluding file paths in the Find in Path dialogue was not added until IntelliJ 2016.1 per this IntelliJ forum response.




回答3:


As for IDEA 2019.1 Ultimate, it works for me(exclude with !*.yml or anything else).

If it does not in yours, as you only as .ftl file to exclude, why not add mask as *.java?

PS: what does not work is exclude some path, like "all files under out/ folder". With !out/* or anything ales it does not work.



来源:https://stackoverflow.com/questions/36262526/intellij-file-mask-not-working-on-simple-excluding-file-pattern-why

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!