Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Eclipse, how do you find methods that you have defined but not used/called anywhere in the app?

I am concerned that some of the classes in my app have methods that are defined but not called anywhere in the app.

In Eclipse is there a way to find these methods?

like image 323
Daniel K. Avatar asked Nov 03 '10 19:11

Daniel K.


People also ask

How can I see unused methods in Eclipse?

UCDetector (Unnecessary Code Detector) is a eclipse PlugIn tool to find unnecessary (dead) public java code. For example public classes, methods or fields which have no references.

How do I list all methods in Eclipse?

You can open any method or type in your workspace using the "Open Type" wizard or the "Open Method" wizard. -Or- press Ctrl+Shift+T (for a type) or Ctrl+Shift+M (for a method). The "Open Type/Method" dialog will appear. If a type/method was previously selected in the editor or outline views, it will be displayed.

How do I go back a call method in Eclipse?

Press Alt + Left Arrow and Alt + Right Arrow like you would in a web browser.


1 Answers

You can use Findbugs for this, but there's also a plugin dedicated to this: UCDetector.

like image 61
BalusC Avatar answered Oct 14 '22 08:10

BalusC