Eclipse 指标插件建议

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1047054/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 18:48:43  来源:igfitidea点击:

Eclipse metrics plugin suggestion

eclipseeclipse-pluginmetricscode-metrics

提问by Ben S

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

我正在寻找一种工具来为我提供一些代码指标(总 LOC、LOC/类、外部引用/类的数量等......)。

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

有谁知道一个好的eclipse插件可以为我提供一些代码指标吗?

采纳答案by akf

hereis one called Metrics.

是一种称为指标的方法。

edit:

编辑:

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

我在 eclipse 3.3.1.1 中为这个截图整理了一个简短的程序:

Edit 2
Metrics New versionThanks @mpartel for the link

编辑 2 个
指标 新版本感谢 @mpartel 提供链接

回答by kjwenger

CodePro AnalytiX originally form Instantiations is now free at Google:

CodePro AnalytiX 最初形式 Instantiations 现在在谷歌免费:

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

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

回答by ebt

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.

很抱歉发布了 necropost,但这似乎是正确的做法,因为这是我的起点。试试Metrics2,它是原始指标插件的一个分支,是为 Eclipse 3.5 构建的。

回答by kc2001

There is an updated versionof 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.

上面描述的 Metrics 插件的更新版本应该可以满足您的需求。它可以聚合一些度量(例如,将包中类的 LOC 相加,以提供包的 LOC)并将度量导出到 XML。在不久的将来的某个时候,它还应该将它们导出到关系数据库中。

回答by kapil das

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.

如果您只想要 LOC,请使用 locmetric http://www.locmetrics.com/。如果您想检查指标和代码覆盖率,请使用 SONAR 或 Eclips CodePro Analytix 插件。

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

我建议使用 https://developers.google.com/java-dev-tools/codepro/doc/它有自动化工具测量 Java 源代码的质量和代码覆盖率

回答by Jordan Stewart

回答by Zoltán Ujhelyi

I also recommend the eclipse-metrics plugin.

我还推荐 eclipse-metrics 插件。

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).

它能够将指标导出为 html,并且能够从 ant 任务中执行此操作(至少根据文档,我从未尝试过)。

The plugin works even in Eclipse 3.5 fine.

该插件甚至在 Eclipse 3.5 中也能正常工作。

回答by iberbeu

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

另一个不错的项目是projectusus,它不仅向您展示指标,还向您展示您是否遵守标准,并提示您应该重构什么