Is there a plug-in for Eclipse that lets you search based on the Java AST (Abstract Syntax Tree) of your project files? The "Java Search" feature doesn't seem to cover cases like:
"Get me all the fields declared as type 'X' in all classes"
I can imagine many more possibilities that would open up with an AST-based search, but I don't even know if such a plug-in would have practical performance.
Update: As pointed out by Kevin below, the Java Search feature does cover the use case I mentioned. I'm still curious though about whether or not someone has written a plug-in that allows any arbitrary kind of AST search, ex. "Get all string concatenations" (InfixExpression with + operator and StringLiteral operand)
There are several Eclipse plug-ins that provide object-oriented query languages and aim to answer such queries. Some of them:
Outside Eclipse there is JArchitect Code Query Language
Get me all the fields declared as type 'X' in all classes
I don't know what else you had in mind but I believe you can accomplish this specific search by doing the following:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With