如何在NetBeans项目中计算行数 [英] How to count lines in a netbeans project

查看:368
本文介绍了如何在NetBeans项目中计算行数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我有netbeans 7,我想知道如何计算项目的总行数.我已经浏览过Google,但是每次浏览时,我只会发现死胡同或无法正常工作的插件.有人知道怎么数行吗?

Hello I have netbeans 7 and I was wondering how to calculate the total lines for a project. I have looked through Google but every time I do it I only find dead ends or non working plugins. Does anyone know how to count the lines?

推荐答案

您可以使用 wordcount nb-wordcount 与8.2兼容.

You can use wordcount that works with 7.1 nb-wordcount that works with 8.2.

要配置字数统计,请进入工具-> 选项-> 其他. 如果要匹配Java和Groovy以外的其他文件,则必须更改Accept filename.

To configure wordcount go in Tools->Options->Miscellaneous. You have to change Accept filename if you want other files than Java and Groovy to match.

要显示计数窗口,请进入 Window -> 打开WordCount窗口.

To display the count window go in Window->Open WordCount Window.

要显示统计信息,请单击 WordCounting (第二个按钮).我将显示在 Projects(窗口)中选择的目录的统计信息(它必须是一个软件包或类似Source Packages或Web页面的内容,如果您选择了该项目,它将不起作用).

To display stats click on WordCounting (second button). I will display the stats of the directory selected in Projects (window)(it has to be a package or something like Source Packages or Web pages, it won't work if you select the project).

如果您在Linux上,也可以简单地执行:

Also if you are on linux you can simply execute :

 find . -name '*.java' | xargs wc -l

这篇关于如何在NetBeans项目中计算行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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