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?
相关问题
- Step by step instructions for getting cppunit up a
- org.jdesktop.application package doesn't exist
- Don't want netbeans debugger to go to disassem
- using rmic in netbeans
- netbeans unable to resolve identifier c_str
相关文章
- Java: Look and Feel
- C++ compiler error in netbeans
- How to escape @ sign inside JSDoc comments in NetB
- php: auto indent the whole code?
- Create src/test/resources in Maven Netbeans 8.x wi
- Stop Tomcat when run inside of Netbeans
- Failed to execute goal org.codehaus.mojo:exec-mave
- Can build, but can't run C code in netbeans (b
I was hoping for a cut-and-paste answer. So I wrote one.
EDIT: Supports millions of lines of code. No external libraries required.
The results appear similar to the following:
If it's missing something please let me know and I'll do my best to correct it. Thanks!
You can use
wordcount that works with 7.1nb-wordcount that works with 8.2.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.To display the count window go in Window->Open WordCount Window.
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).
Also if you are on linux you can simply execute :
I know this is a very old question however there is a simpler way of finding the line count in a netbeans project that doesn't involve installing plugins:
Note: Don't right click on the project itself as that will cause it to count the lines in all the generated files too.
Find
orFind in Files
or press CtrlF.Match
dropdown is set toRegular Expression
.\n
into the search box.Search Results
tab.Note: In NetBeans, the search is stopped after 5000 results, so if your project is longer than that then this method won't work
You could use Source Code Metrics for Java Projects.