Is there any way in the Eclipse Open Resource (Ctrl+Shift+R) dialog, to find *.js files, but NOT *.jsp or *.jspx or any other *.js* file? Someone asked a related question, but the solution given just doesn't work in my Eclipse Indigo.
4 Answers
The non-obvious actual solution is provided in this eclipse forum thread. I'm going to look into posting a bug indicating that this mechanism should be advertised in the interface somehow.
The solution may differ depending on the version of Eclipse but in the version I'm using (Kepler Service Release 1, build 20130919-0819), the only way of displaying Javascript files but not JSP files is to type the following in the Open Resources dialog:
*js<
Note the absence of any dot before the js - this was stopping it from working for me (appears to be a bug?) It could of course be further filtered, e.g. to start*js< or *middle*js< etc. as appropriate.
You need to enable regular expression in Open Resources dialog. Then type .*\.js$. Basically this matches file names that end with js.
To enable RE in Open Resource dialog, you need to tweak eclipse plugin. Replace the attached jar file in your eclipse plugin folder. NOTE the jar file only works for eclipse 4.5.1.