This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Testing and the fly likes Finding unused classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Finding unused classes" Watch "Finding unused classes" New topic
Author

Finding unused classes

Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
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

Joined: Dec 29, 2004
Posts: 1071
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

Joined: Jul 11, 2001
Posts: 14112
Vote for https://bugs.eclipse.org/bugs/show_bug.cgi?id=52364


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

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.


The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Finding unused classes