eclipse 在eclipse中查找项目中的行数?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6500111/
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
Find number of lines in a project in eclipse?
提问by ahodder
Is there a pluging/feature to count the number of lines in a project?
是否有插件/功能来计算项目中的行数?
回答by PengOne
This may be what you're looking for: http://metrics2.sourceforge.net/
这可能就是你要找的:http: //metrics2.sourceforge.net/
回答by Deepak Azad
A very simplistic way is to do a regular expression search for '\n' in your project. It will give you a good idea on the number of lines in your project without installing any extra plug-ins.
一种非常简单的方法是在您的项目中对 '\n' 进行正则表达式搜索。它会让您对项目中的行数有一个很好的了解,而无需安装任何额外的插件。
回答by Nullpointer
Instead of installing a new eclipse plugin; If you are on a linux system:
而不是安装新的 eclipse 插件;如果您使用的是 linux 系统:
cd
to the eclispe project source directory(workspace/project-name/src)
cd
到 eclispe 项目源目录(workspace/project-name/src)
and enter in termianl:
并在终端输入:
wc -l *.java
wc -l *.java
This will show you total number of lines as well as number of lines in each file
这将显示您的总行数以及每个文件中的行数