views:

1871

answers:

5

I'm looking for a tool to give me some code metrics (total LOCs, LOC/Class, # of external references/class, etc...).

Does anyone know a good eclipse plugin that could provide me some some code metrics?

+2  A: 
akf
This looks kind of old. Their latest news: "New release for Eclipse 3.1 2005-07-08".
Ben S
just installed it at home on the mac. looks good on 3.3.1.1
akf
I've been researching metrics plug-ins recently. Since this is the accepted answer, I wanted to point out to future readers looking for metrics plugins (like me) that a couple of the other answers mention 'metrics2'. The metrics2 project claims that metrics.sourceforge.net is discontinued, so metrics2 is intended to be a continuation of it. As of the writing of this comment, the last release was Jul 2010 and code was last committed as recently as 6 days ago.
Bert F
+1  A: 

A search for eclipse code+metrics turns up http://eclipse-metrics.sourceforge.net/, which looks good.

Jordan Stewart
This is a snazzy one that creates warnings when the metrics start to show potential problems, but it doesn't seem to have a summary feature with overall stats.
Ben S
+1  A: 

I also recommend the eclipse-metrics plugin.

It is capable of exporting the metrics into html, and is capable of doing this from an ant task (at least according to the documentation, I have never tried it).

The plugin works even in Eclipse 3.5 fine.

Zoltán Ujhelyi
+1  A: 

There is an updated version of the Metrics plug-in described above that should do what you need. It can aggregate some of the measurements (e.g. add up the LOC of classes in a package to give you the LOC of the package) and export the measurements to XML. Some time in the near future, it should also export them to a relational database.

kc2001
+2  A: 

Sorry for the necropost but it seems like the right thing to do since this was my starting point. Try Metrics2, its a fork of the original metrics plugin and is built for Eclipse 3.5.

ebt