you could use former instantiations product codepro analytix. this eclipse plugin provides you suchlike statistics in code metrics view. this is provided by google free of charge.
i think if you have myeclipse, it adds a label to the project properties page which contains the total number of source code lines. might not help you as myeclipse is not free though.
unfortunately, that wasn't enough in my case so i wrote a source analyzer to gather statistics not gathered by other solutions (for example the metrics mentioned by albertopl).
you could use a batch file with the following script:
for /f "tokens=*" %%g in ('dir "%cd%\src\*.java" /b /s') do (type "%%g") >> lines.txt
for /f "tokens=*" %%g in ('type lines.txt') do (set /a lines+=1)
echo your project has currently totaled %lines% lines of code.
are you interested in counting the executable lines rather than the total file line count? if so you could try a code coverage tool such as eclemma. as a side effect of the code coverage stats you get stats on the number of executable lines and blocks (and methods and classes). these are rolled up from the method level upwards, so you can see line counts for the packages, source roots and projects as well.
for eclipse(indigo), install (codepro).
- right click on your project
codepro tools --> compute metrics
- and you will get your answer in a metrics tab as number of lines.
under linux, the simpler is:
- go to the root folder of your project
findto do a recursive search of *.java files
wc -lto count lines:
to resume, just do:
find . -name '*.java' | xargs wc -l
regular expression box.
use this expression:
select whatever file types (
*.xml, etc..) and working sets are appropriate for you.
- Counting Line Numbers in Eclipse
- No line numbers in Eclipse or Android Studio XML editor
- removing line numbers for copied code in eclipse
- eclipse debugging shows source files with wrong line numbers
- C++ Eclipse Galileo getting it to display line numbers - how?
- Edit Line Numbers in Eclipse
- Eclipse IDE : Change font of line numbers pane
- Line numbers don't show in aptana plugin for eclipse
- Line numbers not updating on 2nd monitor - Eclipse STS 2.8.1RELEASE - OS X Lion
- CSS colors beside line numbers in Eclipse
- Eclipse plugin: Finding line numbers containing a substring not working
- Is there a way I can copy code from Eclipse IDE with line numbers so I can paste it into a word document?
- Eclipse changing line numbers
- how to delete particular statements of the entire workspace in Eclipse IDE using line numbers automatically
- Is it possible to force Eclipse to preserve accurate line numbers for compiled java classes?
- How can I show line numbers in Eclipse?
- Eclipse - Unable to install breakpoint due to missing line number attributes
- Eclipse copy/paste entire line keyboard shortcut
- Delete a line in Eclipse
- Build Eclipse Java Project from Command Line
- Wrapping chained method calls on a separate line in Eclipse for Java
- Eclipse shortcut "go to line + column"
- How to stop Eclipse formatter from placing all enums on one line
- What do those yellow horizontal arrows in eclipse, at the left of the line numbers do?
- How to make Eclipse prompt me for command line arguments
- How to change the color of current line & text selection in eclipse (for Java)?
- Java - Build and run eclipse project from command line
- Vertical line between matching curly braces for java in eclipse
- Remove blank line in Eclipse
- Add @SuppressWarnings("unchecked") in generics to single line generates eclipse compiler error
More Query from same tag
- Insert input in Eclipse console - Java
- How can I configure the Eclipse editor (or PyDev) to treat a dot as a word boundary on Mac OS X?
- ActivityCompat can't find .checkSelfPermission in eclipse
- Android NDK - Can't use stl map emplace
- How do I simplify debugging nodejs in Eclipse?
- How to add plugin (ibm content navigator) to intellij idea
- Build error with a Hello World C program with a default CDT plugin installation in Eclipse on Ubuntu
- Application stopped unexpectedly Android Development
- Eclipse PDT - way to close files by doubleclick
- Run ANT file within the same workspace JRE
- Eclipse with android plugin - Blocked at "calculating requirements and dependencies"
- Eclipse does not seem to compile servlet, causing java.lang.ClassNotFoundException
- Time limit for progress dialogue in android
- Eclipse failed to response under Fedora 12
- Google Play Services Library not installing
- Use CVS and GIT together in Eclipse
- Can you explicitly set the background color of a SWT Text widget to the default color?
- How protect/license an Eclipse RCP feature/product?
- Error: method X must override or implement a supertype method
- Step debugging collapses my expanded arrays in Eclipse's Debug View (C++)
- PyDev Jython Interactive Console on Eclipse fails to be created
- Eclipse Android XML content assist not working
- How do I change my SVN account in subclipse
- How and when are .metadata and .plugins folders created in eclipse
- aptana 3 windows - terminal access denied
- Being notified of caught exceptions in Eclipse / Java application
- C++ HelloWorld not printing correctly
- Spring tool suite java perspective shows blank
- Are there any major advantages of moving Java development of a server-based product to 64-bit?
- Why can't I save file in Eclipse Juno?