Community
Participate
Working Groups
The kdm.source discoverer allows to have a representation of files/folders for one specific container, differentiating binary and not-binary files. Computing lines of code number is a simple and a recurrent need whatever the source languages used. Many metrics tools proposes such a feature but are not always straightforward to install or use. It would be easy-to-do and convenient to have a facet on kdm.source metamodel to add some number of lines display. We may compute it on SourceFile, ConfigurationFile and InventoryContainer (sum of sub elements). We may imagine several counting (with or without blank lines, ...).
Created attachment 173393 [details] MoDisco Plug-in with Facet and Queries to count lines in KDM InventoryItems
Created attachment 173522 [details] MoDisco Plug-in with Facet and Queries to count lines in KDM InventoryItems (v2) I had forgotten to internationalize the Manifest. I fixed it and a few other things in this new zip.
Thanks for this contribution. It works fine on files (sourcefile, configuration). But there is missing the count on InventoryContainer.
Created attachment 173626 [details] MoDisco Plug-in with Facet and Queries to count lines in KDM InventoryItems (v3) Here is a new version, which computes counts recursively on InventoryContainers. I also factorized the code and added a singleton cache to avoid parsing the same file several times.
I have committed this plug-in in https://dev.eclipse.org/svnroot/modeling/org.eclipse.mdt.modisco/examples/trunk/org.eclipse.gmt.modisco.infra.facet.examples.kdm (revision 2669)
Contribution integrated.