tags:

views:

27

answers:

2

I have a class Ca which extends Cb. Method M1 is implemented in the parent (Cb). However when invoked by classes, they would typically have called Ca.M1(). I want to find all such occurrences.

Eclipse has a feature 'Find references' (Shortcut: CTRL+SHIFT+G). However, it only works on actual methods defined in a class and not on derived methods.

Is there a an easier way search for this method use in Eclipse?

+1  A: 

Try this plugin. This is absolutely awesome and horribly hard to understand. But anyway fun, and would do your task. http://marketplace.eclipse.org/content/browse-query

This plugin indexes your code, and then you can make queries of it. Even really complicated ones. Example to impress you:

not exists ( matching "serialVersionUID" fields in ) recursive derived classes of class "Persistent"

This stands for finding classes not having serialVersionUID and being the descendant (not just children) of "Persistent" class.

Have fun with it.

Gábor Lipták
A: 

Try nWire for Java. It gives you all possible associations within your code, for derived methods as well.

zvikico