Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to avoid that elements in JavaDoc {@link } are found when I search for references (in Eclipse)?

Writing f.ex. {@link MyClass#myMethod()} in a JavaDoc comment is really great, especially for the clickable link I get in the tooltip, but if I go to MyClass and I right-click myMethod() and select the Reference menu item to find all the calls to myMethod(), in the search results I also get all the references to that method made from JavaDoc comments.

I would highly prefer to only get the references made from actual code, without the references made from {@link tags in JavaDoc comments. Is there a way ?

ADDED: Certainly an advantage of those references inside JavaDoc being considered as "actual" code is that they will be included in refactoring, so when I rename the method those references in JavaDoc will be renamed too, which is great, so the best thing would be if there was a way to have them found by refactoring but not by just searching...

like image 570
SantiBailors Avatar asked Oct 14 '25 16:10

SantiBailors


1 Answers

You can set a filter within the search result view to exclude matches found in Javadoc.

Just click on the triangle dropdown in the upper right corner and select "In Javadoc" or customize via the "filters..." settings.

like image 67
wero Avatar answered Oct 17 '25 06:10

wero