get LOC (Lines of code) in a java file Permanently deleted user 创建于 2015年08月25日 05:29 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.