There is a way to search for type or method declarations or references, using Search > Java in Eclipse. But, what about specifying some more advanced searching criteria, for example:
I've been working on a very large codebase, and having these kinds of queries would help immensely. Browsing the Eclipse Marketplace, closest thing I could find is SEA-QL, but it does not even manage to create an index of all the projects in the workspace.
Any suggestions?
What you're asking for sounds wonderful to me - I don't know of any built in functionality that will easily give what you're asking for. Perhaps someone will suggest a plugin.
However, have you considered a combination of: - "Working Sets" - Regular Expressions - Saved searches
to help alleviate some pain?
A suggestion for your second example: Create a "working set" containing the com.foo.* packages Do a "File" (not Java) search with the Regular Expressions option checked, searching in files of type *.java, for something like:
implements.*I.*\R.*insert
You could make the regex more or less explicit depending on the method signature of the "insert" method.
Saving the searches would allow you to build up (and share) a library of frequently used expressions.
I hacked this example from another SO question and some blogs: Useful regex for Eclipse searching and Eclipse Regex find and replacing amongst others.
You'd also have the added benefit of brushing up on your Regex skills (something I know I need to do myself!)
Incidentally, what source control platform are you using? There are search tools (think Google) available that you can plug in to some source control systems. For example, I use this tool: SVN Query and I'm sure there are others. This also isn't a clean solution to what you're asking. Sorry I don't have a straight answer! Hope someone has a useful suggestion!