在文件搜索中排除 Eclipse/Aptana 中的文件类型
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/242982/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Excluding file types in Eclipse / Aptana find in files search
提问by deadprogrammer
Is there a way to exclude say, image types in Aptana or Eclipse file search? I want to search all files that are not images rather than specifying all the file types that I want to search in.
有没有办法排除 Aptana 或 Eclipse 文件搜索中的图像类型?我想搜索所有不是图像的文件,而不是指定要搜索的所有文件类型。
回答by Cebjyre
Try putting an '!' mark in front of the pattern you don't want to match - putting
尝试放置一个“!” 在您不想匹配的图案前标记 - 放置
!*.cgi, !*.pm, !*.sql
in the File name patterns section is doing the job in a test I'm doing with Eclipse 3.4.1 (when the pattern was just * there was a file of each type, with that pattern, it is only returning js and pl files).
在文件名模式部分中,我正在使用 Eclipse 3.4.1 进行测试(当模式只是 * 有每种类型的文件时,使用该模式,它只返回 js 和 pl 文件) .
I was afraid that it would be a bit naive with the patterns and just allow anything that matched one of them to succeed (ie an sql file would match !*.cgi), but this doesn't seem to be the case.
我担心使用这些模式会有点幼稚,只允许与其中一个匹配的任何内容成功(即 sql 文件将匹配 !*.cgi),但情况似乎并非如此。