用于测量代码行的Eclipse插件 [英] Eclipse plugin for measuring lines of code

查看:183
本文介绍了用于测量代码行的Eclipse插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Eclipse Helios(3.6),并且想知道是否有一个漂亮的插件,可以计算java源文件中的逻辑代码行数。按照逻辑,我的意思是

  if(j> 6){
j--;
}

换句话说,2个逻辑行代码(2个语句)将被计数而不是3个物理行代码。

解决方案

Metrics2 是由js3v描述的Metrics插件的更新版本,应该做你所需要的。它还可以聚合一些测量(例如,将包中的类的LOC值相加,以提供包的LOC)。这个页面解释了其一些功能,并提到它计算逻辑行代码,而不是物理代码。


I'm running Eclipse Helios (3.6) and was wondering if there is a nice plugin out there that will count the number of logical lines of code in a java source file. By logical, I mean

if (j > 6) {
   j--;
}

In other words, 2 logical lines of code (2 statements) will be counted instead of 3 physical lines of code.

解决方案

Metrics2 is an updated version of the Metrics plug-in described by js3v that should do what you need. It can also aggregate some of the measurements (e.g. add up the LOC of classes in a package to give you the LOC of the package). This page explains some of its capabilities and mentions that it counts logical lines of code, not physical ones.

这篇关于用于测量代码行的Eclipse插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆