Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find Eclipse projects & folders by name?

Tags:

search

eclipse

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)
    • 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 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!

like image 662
inger Avatar asked Nov 23 '09 22:11

inger


People also ask

How do I see all projects in Eclipse?

In Eclipse, if the Project Explorer pane is not already open, click the Show View icon in the lower left corner of Eclipse, then click Project Explorer.

Where are Eclipse project files located?

The Properties view can be used to find out where the files, directories, and projects that are in Eclipse, are located on your hard disk. With the Properties view visible, select a file, directory, or project in the Project Explorer or Package Explorer view.


2 Answers

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)

like image 134
Scott Stanchfield Avatar answered Oct 04 '22 03:10

Scott Stanchfield


A couple plugins to check out for this:

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.

like image 20
fmjrey Avatar answered Oct 04 '22 02:10

fmjrey