probably does not exist on VW.
Also the logic was the same for Number of statement.
On May 2, 2009, at 3:26 PM, Alexandre Bergel wrote:
String>>lineCount
"Answer the number of lines represented by the receiver, where
every cr adds one line. 5/10/96 sw"
...
Alexandre
On 2 May 2009, at 14:37, Stéphane Ducasse wrote:
what is lineCount?
Stef
On May 2, 2009, at 12:35 PM, Alexandre Bergel wrote:
Dear All,
Computing the number of lines of code is realized through:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
FAMIXBehavioralEntity>>numberOfLinesOfCode
<MSEProperty: #LOC type: #Number>
<property: #LOC longName: 'Lines of code' description:
'The number of lines of code in a method'>
^self
lookUpPropertyNamed: #LOC
computedAs:
[self mooseModel isSmalltalk
ifTrue:
[| parser |
parser := VisualWorksParseTreeMetricCalculator new.
parser processMethod: self usingImporter: nil inModel: nil.
parser numberOfLinesOfCode]
ifFalse: [-1]]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
How to compute the number of lines of code with a C function?
How comes that this method is so closely related to Smalltalk ?
I am tempted to replace this method with something like:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
FAMIXBehavioralEntity>>numberOfLinesOfCode
<MSEProperty: #LOC type: #Number>
<property: #LOC longName: 'Lines of code' description:
'The number of lines of code in a method'>
^self
lookUpPropertyNamed: #LOC
computedAs:
[self source lineCount]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Where source will be defined as:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
FAMIXBehavioralEntity>>source
^ self sourceAnchor source
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Any comments before I proceed?
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev