Counting Line Numbers in Eclipse
Search
> File Search
Check the Regular expression
box.
Use this expression:
\n[\s]*
Select whatever file types (*.java
, *.xml
, etc..) and working sets are appropriate for you.
Under linux, the simpler is:
- go to the root folder of your project
- use
find
to do a recursive search of *.java files - use
wc -l
to count lines:
To resume, just do:
find . -name '*.java' | xargs wc -l
Here's a good metrics plugin that displays number of lines of code and much more:
http://metrics.sourceforge.net/
It says it requires Eclipse 3.1, although I imagine they mean 3.1+
Here's another metrics plugin that's been tested on Ganymede:
http://eclipse-metrics.sourceforge.net