From: Moose-dev [mailto:moose-dev-bounces@list.inf.unibe.ch] On Behalf Of Stéphane Ducasse
Sent: vendredi 29 septembre 2017 13:22
To: Moose-related development
Subject: [Moose-dev] About numberofLines of code

 

Hi 

 

Hi,

 

It seems totalNumberOfLinesOfCode disappeared from FamixTypeGroup recently. 

 

Indeed. I removed it because it was a duplication of numberOfLinesOfCode.

 

Now I wonder if the new implementation is correct because it would be nice to take into account class definition size.

 

MooseAbstractGroup >> numberOfLinesOfCode

            <MSEProperty: #numberOfLinesOfCode type: #Number>

            <MSEComment: 'The number of classes in the model'>

            ^ self

                        lookUpPropertyNamed: #numberOfLinesOfCode

                        computedAs: [ self allMethods sum: #numberOfLinesOfCode ]

 

What do you think?

 

That it is only for Smalltalk because with do not have this problem in Java. I do not even think that in Smalltalk the class definition is represented in the moose model by an entity.

I have no time to check it now.

 

If you want to specialize it, it should be language dependent.

 

Cheers,

Vincent

 

 

Stef

 

--------------------------------------------

Stéphane Ducasse

03 59 35 87 52

Assistant: Julie Jonas 

FAX 03 59 57 78 50

TEL 03 59 35 86 16

S. Ducasse - Inria

40, avenue Halley, 

Parc Scientifique de la Haute Borne, Bât.A, Park Plaza

Villeneuve d'Ascq 59650

France