One possible way to count lines of code in Eclipse:
using the Search / File... menu, select File Search tab, specify \n[\s]* for Containing text (this will not count empty lines), and tick Regular expression.
Hat tip: www.monblocnotes.com/node/2030