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?
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.
If your class overrides toString()
, right-click on method name > References > Workspace.
If your class doesn't override toString()
, you can't.
Implicit calls, for example when instances of your class are concatenated with a String
, won't ever show.
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