Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317577 - Proposal for a new Facet on kdm.source : lines of code computing
Summary: Proposal for a new Facet on kdm.source : lines of code computing
Status: CLOSED FIXED
Alias: None
Product: MoDisco
Classification: Modeling
Component: Infrastructure (show other bugs)
Version: 0.9.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 0.9.0 M1   Edit
Assignee: Nicolas Bros CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 317733
Blocks:
  Show dependency tree
 
Reported: 2010-06-22 09:27 EDT by Fabien Giquel CLA
Modified: 2010-10-18 08:30 EDT (History)
4 users (show)

See Also:
nicolas.bros: indigo+
fabien.giquel: review+


Attachments
MoDisco Plug-in with Facet and Queries to count lines in KDM InventoryItems (13.71 KB, application/x-zip-compressed)
2010-07-05 04:57 EDT, Nicolas Bros CLA
no flags Details
MoDisco Plug-in with Facet and Queries to count lines in KDM InventoryItems (v2) (15.39 KB, application/x-zip-compressed)
2010-07-06 06:03 EDT, Nicolas Bros CLA
no flags Details
MoDisco Plug-in with Facet and Queries to count lines in KDM InventoryItems (v3) (22.83 KB, application/x-zip-compressed)
2010-07-07 05:03 EDT, Nicolas Bros CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabien Giquel CLA 2010-06-22 09:27:17 EDT
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, ...).
Comment 1 Nicolas Bros CLA 2010-07-05 04:57:21 EDT
Created attachment 173393 [details]
MoDisco Plug-in with Facet and Queries to count lines in KDM InventoryItems
Comment 2 Nicolas Bros CLA 2010-07-06 06:03:52 EDT
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.
Comment 3 Fabien Giquel CLA 2010-07-06 11:58:08 EDT
Thanks for this contribution.
It works fine on files (sourcefile, configuration).
But there  is missing the count on InventoryContainer.
Comment 4 Nicolas Bros CLA 2010-07-07 05:03:01 EDT
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.
Comment 6 Hugo Bruneliere CLA 2010-10-04 13:46:03 EDT
Contribution integrated.