tags:

views:

71

answers:

2

Is there a way to search for folders/projects by name in the Eclipse workspace?

The results would best be returned in a view where I can do bulk operations (like closing, opening, assign working set). It's just to fiddly to manually click through the list of hundreds of projects.


This seemingly trivial task is causing grief to me, which I find embarrassing after all my Eclipse years.

I have tried:

  1. Search dialogs (Ctrl+H) - among the multitude of options, I don't find anything that would actually select folders or projects (only files)
  2. Open Resources(Ctrl+R), looks handier than the dialogs, but again: only file search. BTW, why isn't that called "Open File"? resource can normally be a folder too, right?
  3. use filtering in the package/project explorer.. But that only supports filtering things out - no way to keep only things matching a pattern
  4. can Working Sets be set up in a dynamic way? (given search criteria, rather than fixed assignment in a fiddly dialog). EDIT: this is the winning option, see below.

Did I miss something? Maybe a 3rd party plugin that gives sane searching for anything? Would (Eclipse/GroovyMonkey) scripting help with this? Mylyn? Is this too much to ask for, from a such mature environment?

I have kindly asked this on Eclipse forums, and they kindly answered "No" :) As usual, I have more confidence in SO folks, and would be grateful for ideas.


And the -current- winner is Scott's excellent dynamic working sets plugin, which exactly implements the option 4 above!

+2  A: 

First, I'll answer the "dynamic working set" question:

I've written a dynamic working set plugin. It allows you to group projects by project nature, regular expressions for names, and (as an extension to it) maven group and project name.

Check it out at http://code.google.com/p/javadude/wiki/DynamicWorkingSets

That may give you everything you need for now...

Otherwise, I don't think there is anything like what you're looking for, unless someone writes a plugin for it (which would be easy to do, once used to writing eclipse plugins)

Scott Stanchfield
Wow, your plugin is fantastic! Just got it installed - exactly what I was waiting for. If I didn't see that I would definitely be starting something similar. So, thanks a million for saving my day/night!S.O. is also awesome, but it should really allow to rate vote up by more than 1 :-)
inger
Handy looking project, thanks for the link.
Nick Veys
Thanks! Glad you like it! Let me know if there's something you think it should do to be more useful.
Scott Stanchfield
How do you use the m2Eclipse functionality? This is pretty cool plugin BTW, thanks!
javamonkey79
There's a separate feature you need to install. The eclipse update site http://javadude.googlecode.com/svn/trunk/com.javadude.updatesite has a "JavaDude Dynamic Maven Working Set" feature available under the Dynamic Working Sets group. You need to install this as well as the base dynamic working sets and m2eclipse. You can then create a "Dynamic Maven Working Set", filtering by group and artifact patterns.
Scott Stanchfield
A: 

Another option is to use the "filter" option on the package explorer. You can specify a few filters (including names) to filter out items. That might help a bit, but not a huge amount.

Look for it under the little down-pointing triangle button on the package explorer tool bar.

Scott Stanchfield
Oh yes, I tried that one too (just forgot to mention). That's not too helpful right now, when I'm looking for projects ending with "-test". I really don't understand the Eclipse guys, with the effort they have done this fancy "extended filtering", simple "Filter In/Out" checkbox didn't fit in the budget? Or least pull in java.util.Regex so I could do exlusions... Yeah, the idea must be give the crappiest usability to leave room for extensions - like yours. Thanks again!
inger