[ANN] metrics plugin updated and moved to a new home [message #588075] |
Fri, 27 December 2002 23:09 |
Frank Sauer Messages: 36 Registered: July 2009 |
Member |
|
|
A new release (1.0.1) is now available at the following location:
http://www.sourceforge.net/projects/metrics
This version uses the jdt.core.dom AST mechanism to actually parse the
compilation units in order to calculate more complex metrics such as the
McCabe cyclomatic complexity, also known as V(G). This also allowed
for a more meaningful count of blocks; it now measures maximum nested block
depth for each method, instead of simply all blocks.
As a side effect of the above, lines of code now counts comments *within*
method bodies. I have not found an easy way to strip those, since the AST's
MethodDeclaration does not expose the real source, only source without
linebreaks and the offset/length for the entire method body. I now use the
latter
to calculate the number of lines.
Because using the ASTs slowed the calculations down a lot, the values are
now
stored as persistent properties on the underlying resource and are only
recalculated when either the resource was changed since the last
calculation,
or a new version of the metrics plugin was installed (which could contain
new metrics
not currently cached)
Using this has not changed; simply open the properties for a project,
package root,
package fragment or compilation unit and look at the Metrics page.
Please let me know if you find any problems, or want to suggest other
metrics
to calculate. I'm thinking about how to make the metrics pluggable using the
standard extension mechanism.
Enjoy,
Frank Sauer
|
|
|
Powered by
FUDForum. Page generated in 0.02545 seconds