Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Finding unused classes

 
Steven Bell
Ranch Hand
Posts: 1071
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anybody know of a static analysis tool that will allow me to find classes that are not used. I've looked at JProbe, and that doesn't seem to have this ability. I've also looked at PMD, which looks to have alot of neat static analysis tools, but they are all class level rather than project level.

Reason:
Working on a rather large project. Have gone through a number of redesigns/refactors. We know there are a fair number of classes that are not used anymore, but going one by one and checking for dependencies is a tedious operation that we really don't have time for.

Thanks.
 
Steven Bell
Ranch Hand
Posts: 1071
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have heard that IntelliJ IDEA has the ability I'm looking for. Does anybody have any experience with this?

It's to large for me to download at work, I'll have to wait until I get home, then bring it in, but It'd be nice to hear if it will do the trick before I go through the effort.

Also we are using eclipse for development, if IDEA has this ability I'd be surprised if somebody hasn't written an eclipse plugin to do it also, but I sure can't find it.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vote for https://bugs.eclipse.org/bugs/show_bug.cgi?id=52364
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you would have found it by now.
In case anyone else is looking for the same information, Idea can do that.
Choose Analyze -> Inspect Code, and set your criteria for code inspection.

HTH.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic