0

I've got an android project that I started from an old standard Java project, so because of the vast difference in target platform, I have a lot of dead code to cleanup.

I've seen UCDetector recommended for finding unused public methods in java projects in Eclipse. I installed it as directed, and it just doesn't show up on the menu, and I have no idea how to get it to work.

Has anyone got this combo to work, or have another recommendation? Or know how to get it to show up?

My menu, where is it?

(I've tried Find Bugs which found some good stuff, but it doesn't find unused public code.)

Community
  • 1
  • 1
Jay
  • 3,203
  • 2
  • 25
  • 31

2 Answers2

2

Big warning!

It might partially work, but beware, cause it doesn't seem to know about XML-defined callback functions.

If you have installed a callback function on a widget, say a button in an XML Style Sheet, and it is not called in code, UCdetector will think it has 0 references, and suggest it deleted. This obviously is wrong, and will render your code uncompilable.

There might be other similar issues, related to Android specifics.

Viggo

  • +1, but it's not a really "big warning", in my opinion. Just operate mindfully and you'll see it's a great companion. – Phantômaxx Apr 10 '14 at 15:12
1

Yes, UCDetector works for android projects. I just installed it and it works.

It's available in context menu of project in Package Explorer.

Sergey Glotov
  • 20,200
  • 11
  • 84
  • 98
  • I posted my menu... it's not there. Find Bugs shows up. I'm confused. I just dropped version 1.8.0 in dropins directory like it says. – Jay Aug 27 '11 at 00:56
  • 1
    Try to remove it from dropins and install from http://ucdetector.sourceforge.net/update – Sergey Glotov Aug 27 '11 at 01:10
  • 1
    Aha! I had to do both, put it in dropins and then install from the update site. – Jay Aug 27 '11 at 01:49