Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find annotation usage using Eclipse IDE?

Using Eclipse IDE, I'd like to get a list of all "things" annotated with a specific Java annotation.

For instance, I would like to get a list of all methods annotated with @Bean in Spring Framework's source code or JARs.

I'm aware that it's possible to look up annotation usage programmatically, as pointed out in this question. Instead I would like to look up annotation usage at development time within my Eclipse IDE.

like image 445
Abdull Avatar asked Apr 12 '12 13:04

Abdull


People also ask

How do I find annotations in eclipse?

Try: CTRL-H -> File Search, check Case Sensitive and Regular expression, and input: @[A-Z] for Containing text.

How do I see usage in eclipse?

Press Ctrl + Shift + G.


1 Answers

You can search for references in Eclipse. Click the annotation name, then right-click, select "References" and pick a scope for your search.

like image 64
Rob Avatar answered Oct 25 '22 23:10

Rob