Hi,

Retrieving numberOfLinesOfCode first looks up the property and computes it only afterwards. This happens with all lazy properties. The idea is that if you have access to the property computation at analysis time, you should use it. If not, then you should populate the property when you are creating the model.

^ self
lookUpPropertyNamed: #numberOfLinesOfCode
computedAs:[...]

Cheers,
Doru




On Tue, Mar 5, 2013 at 10:06 AM, Fabrizio Perin <fabrizio.perin@gmail.com> wrote:
Hi,
the metric numberOfLinesOfCode it doesn't work on an imported moose smalltalk model because it looks for the compiled method version to calculate the actual lines of code. I think we should seriously rethink the entire smalltalk importing and handling phase because it is not possible that only pharo can be imported and analyze: In all the places where a "isSmalltalk" method is invoked, if that means that you are going to look for smalltalk code in the image, we should change it with a method called "isSmalltalkCodeLoaded". This method can be set since the import phase.
 
What do you think?
 
Cheers,
Fabrizio
 
PS: I hope I can make the code I wrote to import Smalltalk available ASAP, that could be use as a start to create a image code independent parser/importer :)

_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--
www.tudorgirba.com

"Every thing has its own flow"