How to find Eclipse projects & folders by name?
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:
- Search dialogs (Ctrl+H) - among the multitude of options, I don't find anything that would actually select folders or projects (only files)
- 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?
- use filtering in the package/project explorer.. But that only supports filtering things out - no way to keep only things matching a pattern
- 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 th开发者_高级运维is 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!
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)
A couple plugins to check out for this:
- the Eclipse Glance plugin on googlecode
- the Eclipse Project Exploring plugins on github
- the selectproject plugin on googlecode
I'm using the first one and I'm quite happy with it. It adds a key shortcut (Ctrl+Alt+F) to search within most tables, treeviews, and text displays and it highlights occurences within the component. Works on editors, package explorer, etc.
I have not use the second plugin but here's what the home page says:
A set of eclipse Plugins which allow easier handling of an eclipse workspace with lots of Projects in it.
Filter Package Explorer
The Filter Package Explorer provides a view called FPackage Explorer which extends the Package Explorer and adds a filter field at the top.
Go to Project Plugin
The Go to Project Plugin provides a dialog similar to the Open Type dialog which lists all available projects in the workspace and allows you to filter them. When selecting one here it is automatically highlighted in whatever file displaying view you might have open. If you don't have any open the Package Explorer is opened showing the project.
The third one is new, here's what it's page says:
Eclipse contains popular shortcuts for selecting types and resources (such as Ctrl+Shift+T). This plug-in adds a similar shortcut for projects as well. Type a few letters with wildcards and quickly select one or more projects. Great for navigating, grouping projects into working sets, or other batch operations on projects.
If you're wondering how to do it programatically you can also check this other question.
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.
精彩评论