Finding references of MyClass.toString() in Eclipse while ignoring Object.toString()

eclipse, java, tostring

Solution

Either right-click your override toString() method and select References > Workspace, or simply press Ctrl+Shift+G while the cursor is on the method.

As some people have pointed out the list of results will normally include the vast number of references to the toString() method of class Object, which can be thousands or tens of thousands of hits. This obviously makes the whole search rather useless.

Luckily you can filter the results, by clicking on the little triangle on the top right of the Search tab and select to filter out all References to Overridden, which will leave you with just the references to your concrete class' method override.

Problem

When attempting to do so, Eclipse will display all the calls in the project for any `.toString()` method, which is of course not what I'm aiming to. Is there any way to filter the matches such that only classes of a certain type show up in the results pane?

Original source