Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Counting No of Lines  RSS feed

 
mo sayed
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is there any tool (freely available) to report on number of lines
for each class in a project (preferably eclipse-plugin)?
regards,
Mo
 
Joni Salonen
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Unix command "wc" can count the number of characters, words, and lines there are in a collection of input files. For example to print the number of lines of all java source code files in the current directory do:

 
mo sayed
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by mo sayed:
Hi,
Is there any tool (freely available) to report on number of lines
for each class in a project (preferably eclipse-plugin)?
regards,
Mo


Sorry I should have made it clearer. I'm using XP.
 
Joni Salonen
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MS provides wc as a part of Services for Unix (SFU). You can also install a Unix-like environment, for example cygwin: http://www.cygwin.com I'm pretty sure there's some plugin for eclipse to count the number of lines though...
 
Rusty Shackleford
Ranch Hand
Posts: 490
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could write a very simple program yourself to do. Even use it as an eclipse plug-in if you are feeling adventurous.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!