Eclipse - search for resource - limit extension to match .js NOT .jsp

試著忘記壹切 提交于 2019-12-24 07:19:26

问题


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?


回答1:


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à!




回答2:


I asked about this in the Eclipse forums, and found a real solution.



来源:https://stackoverflow.com/questions/6519593/eclipse-search-for-resource-limit-extension-to-match-js-not-jsp

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