Reputation: 13489
When I want to find usages of a normal method in java it is fairly easy and straightforward CTRL-SHIFT-G .
However if this method has a super definition, or implementation, then eclipse will show me usages of all types in the hierarchy types.
For example, if I have a toString() method on my class, I would only be interested in finding exactly where this toString() of this class was being called, instead eclipse gives me every single ancestor toString in the project (ie Object.toString()).
How do I find only specific usages to my class? And not usages of parent classes like Object.toString() ?
Upvotes: 17
Views: 13960
Reputation: 71
After having the same problem as many others in the comments (Eclipse shows references to Object.toString()) I have found a way that seems to work correctly:
Go to outline from your custom class, right click on your toString() implementation and References -> Project. This displays only references to said implementation.
Upvotes: 0
Reputation: 3045
Alt + ctrl + h
should give you exactly, what you are looking for.
Updated with screenshot from my workspace as some people are facing issue in following it:
Upvotes: 21