Please consider editing your post and mark it as obsolete instead. Do you want to delete post?
get LOC (Lines of code) in a java file
Permanently deleted user
Created
Does anyone knows APIs or a way to get loc (lines of code) or number of ast nodes or psi elements of a java file. I need that to do some statistics. Thanks.
There is an existing plugin that can calculate all sorts of statistics for your code: https://plugins.jetbrains.com/plugin/93?pr=
If the plugin doesn't do what you need, you can check its source code and customize it to your requirements.