Eclipse metrics plugin suggestion [closed]

2020-05-19 07:07发布

问题:

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?

回答1:

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



回答2:

CodePro AnalytiX originally form Instantiations is now free at Google:

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



回答3:

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.



回答4:

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.



回答5:

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



回答6:

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



回答7:

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.



回答8:

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



回答9:

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