Le 1 oct. 2017 à 01:25, Vincent BLONDEAU <Vincent.Blondeau(a)polytech-lille.net> a
écrit :
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.
It is wrong.
In Java, the number of lines of code of a class DOES NOT EQUAL to the sum of the number of
lines of code of its methods. You have all the class definition part with the imports, the
variable instance definitions and so on.
Stephane’s remark does not mean that the old definition was correct. In any case, the new
one is wrong.
Cheers,
Anne
If you want to specialize it, it should be language dependent.
Cheers,
Vincent
Stef
--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr
http://www.synectique.eu /
http://www.pharo.org
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
_______________________________________________
Moose-dev mailing list
Moose-dev(a)list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev