A little off-topic but hopefully useful. Recently, I needed to find all the .java files in my workspace that did not contain a particular phrase (“Eclipse Public License”) to find out which files I had forgot to add copyright notices to. I tried to do this with regular expressions but couldn’t seem to make it work. So I looked into the Eclipse search plugin and finally managed to scribble a negative text search engine i.e. an engine that returns all the files that do not contain a particular phrase. Instructions on how to install and use the plugin are available here.
August 6, 2008 at 1:46 am |
I think the regular file search with an regex like (Eclipse Public License){0} would do it.
August 6, 2008 at 6:32 am |
I’ve tried what you suggested but unfortunately it doesn’t seem to work. I’m sure there must be another way to do it – just couldn’t find it.
November 6, 2008 at 11:34 am |
I tried your feature but it does not show in my preferences->general->search configuration. According to Eclipse (3.3) the negative search feature is active. Any ideas ?
November 6, 2008 at 11:42 am |
I’ve acually built this against 3.4 but I believe it should work with 3.3 too. Do you have Java 1.6 installed? (the plugin is built against 1.6 but I should probably change it to 1.5 as there is nothing 1.6-specific about it).