Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java/Eclipse How to get usages of type methods in a project?

In Eclipse, I can Ctrl+Shift+G (or r-click -> References-> Workspace) to get all references to a type (or field etc) in the workspace.

What I need is a way to get a list of all places where any method of a given type is used in the workspace. Namely, I'd like to get all calls to methods of type java.math.BigDecimal.

Does Eclipse support such a scenario ?

FWIW: I can do something similar for C# code using VS + Resharper:
r-click on type -> Find Usages Advanced -> Usages of members.

Update

Let me rephrase the question, it seems it's not very clear.

I want to find all of my code that calls any of BigDecimal's methods.
(From this info, I will then manually (?) derive the subset of BigDecimal's public interface that my code is actually using).

like image 922
Cristian Diaconescu Avatar asked Dec 21 '25 09:12

Cristian Diaconescu


1 Answers

Not sure if this what you want, but found here: https://stackoverflow.com/a/11836545/1360074

Press Ctrl+H or from menu bar Search - Search ..., then choose Java Search:

enter image description here

like image 127
Nikolay Kuznetsov Avatar answered Dec 23 '25 01:12

Nikolay Kuznetsov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!