Eclipse - 搜索资源 - 限制扩展名匹配 .js NOT .jsp
在 Eclipse 中,当我按 Ctrl+Shift+R 调出“打开资源”对话框窗口时,我无法找出仅搜索 javascript 文件 (.js) 的方法,因为我输入的任何搜索字符串始终会产生.jsp 文件也是如此。
我尝试了 abc*.js
(显式文件扩展名不起作用,因为仍然返回 JSP),abc*.??
(试图将扩展名的长度限制为任何两个字符,仍然返回 JSP)...这有点烦人。有没有办法让窗口只返回 .js 文件?
In Eclipse, when I press Ctrl+Shift+R to bring up the 'Open resource' dialog window, I can't figure out a way of searching only for javascript files (.js), as any search string I enter will always yield .jsp files as well.
I tried abc*.js
(explicit file extension does not work, as still JSPs are returned), abc*.??
(trying to limit the length of extension to any TWO characters, still returns JSPs)... it's a bit annoying. Is there any way to get the window to return .js files only?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
哇,我自己设法解决了这个问题。对于 Eclipse 来说,这似乎不是正确的做法(顽皮的 Eclipse,顽皮的,你应该为自己感到羞耻),但它确实像一个魅力一样工作 - 就像键入
在搜索词之后。因此,无需搜索“abc*.js”(这也会产生 .jsp 结果),只需输入“abc*.js”(后跟一个空格)即可,现在结果列表中仅显示 javascript 文件。瞧!
Wow, I managed to resolve this myself. It doesn't seem like the correct thing for Eclipse to do (naughty Eclipse, naughty, you should be ashamed of yourself) but it does work like a charm - it's as simple as typing a
<space>
after the search term.So, instead of searching for "abc*.js" (which would yield .jsp results also), one can just type in "abc*.js " (followed by a space) and now only javascript files are presented in the results list. Voilà!
我在 Eclipse 论坛中询问了这个问题,并找到了真正的解决方案。
I asked about this in the Eclipse forums, and found a real solution.