Eclipse metrics plugin suggestion [closed]
Asked Answered
F

9

37

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?

Fossette answered 26/6, 2009 at 2:17 Comment(0)
R
22

here is one called Metrics.

edit:

i put together a short program for this screenshot in eclipse 3.3.1.1:

Edit 2
Metrics New version Thanks @mpartel for the link

Rainey answered 26/6, 2009 at 2:30 Comment(9)
This looks kind of old. Their latest news: "New release for Eclipse 3.1 2005-07-08".Fossette
just installed it at home on the mac. looks good on 3.3.1.1Rainey
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.Sheepcote
Metrics 2 home page: metrics2.sourceforge.netMorna
FYI: I can't get Metrics 2 to show up in a fresh install of Eclipse. It may or may not work anymore either.Candi
Works for me on fresh Install - Dec 2012. Check that you've done the show views thing :-) Dear Eclipse when I install a plugin the odds are on I want the views shown and the thing enabled without my having to step through every menu ever.Nutrilite
The screenshot is no longer hosted at Imageshack, please update!Accent
metric 2 didn't work with eclipse marsAmphictyon
Metrics 2 works for me in Eclipse 26. Requires a manual install from their update site. See link above from @mpartel.Selle
W
28

CodePro AnalytiX originally form Instantiations is now free at Google:

http://code.google.com/javadevtools/download-codepro.html

Whyte answered 20/12, 2010 at 1:37 Comment(1)
Why are there no updated metrics plugins for Luna!Allergist
R
22

here is one called Metrics.

edit:

i put together a short program for this screenshot in eclipse 3.3.1.1:

Edit 2
Metrics New version Thanks @mpartel for the link

Rainey answered 26/6, 2009 at 2:30 Comment(9)
This looks kind of old. Their latest news: "New release for Eclipse 3.1 2005-07-08".Fossette
just installed it at home on the mac. looks good on 3.3.1.1Rainey
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.Sheepcote
Metrics 2 home page: metrics2.sourceforge.netMorna
FYI: I can't get Metrics 2 to show up in a fresh install of Eclipse. It may or may not work anymore either.Candi
Works for me on fresh Install - Dec 2012. Check that you've done the show views thing :-) Dear Eclipse when I install a plugin the odds are on I want the views shown and the thing enabled without my having to step through every menu ever.Nutrilite
The screenshot is no longer hosted at Imageshack, please update!Accent
metric 2 didn't work with eclipse marsAmphictyon
Metrics 2 works for me in Eclipse 26. Requires a manual install from their update site. See link above from @mpartel.Selle
E
17

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.

Erhart answered 12/8, 2010 at 21:4 Comment(0)
S
3

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.

Sinless answered 30/7, 2010 at 3:43 Comment(1)
Metrics2 (ebt's answer) is the current name of the updated version of the Metrics plug-in.Sinless
L
3

If you want LOC only then use locmetric http://www.locmetrics.com/ . and if you want check metric and code coverage usse SONAR or Eclips CodePro Analytix plugin.

i suggest to use https://developers.google.com/java-dev-tools/codepro/doc/ it has Automated tools measure quality of Java source code and code coverage

Lohengrin answered 13/8, 2013 at 10:18 Comment(0)
U
2

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

Unlucky answered 26/6, 2009 at 2:30 Comment(1)
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.Fossette
L
2

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.

Laudatory answered 27/6, 2009 at 16:34 Comment(0)
D
1

Sonar seems worth to look at: http://docs.codehaus.org/display/SONAR/Installing+Sonar+in+Eclipse

Dwt answered 29/11, 2012 at 18:38 Comment(0)
B
0

Another good project is the projectusus, which shows you not only the metrics but also whether you are respecting the standards or not and gives you a hint of what should be refactored

Birthmark answered 27/5, 2013 at 8:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.