Yes, now I have retest in a new image and reloading the C code in moose and
it works. Maybe the problem was due to a 'bad importation' of the C code.
Thanks a lot alex.
2010/1/7 Alexandre Bergel <alexandre(a)bergel.eu>
Hi Cyrille,
I cannot reproduce the problem. I added a new method
FAMIXFile>>numberOfLinesOfCode as an extension of CAnalyzer.
The following test goes green:
-=-=-=-=-=-=-=-=-=-=-=-=
testSourceCode2
| filename1 importer |
filename1 := 'file1.c.xml'.
self removeFileIfPresent: filename1.
self createFile: filename1 with: self sourceFile1XML.
mooseModel := MooseModel new.
importer := CXMLFileImporter inModel: mooseModel.
importer loadXMLFilesNamed: {filename1}.
self assert: (mooseModel entityNamed: 'file1.cunit::foo()')
numberOfLinesOfCode = 2.
self assert: (mooseModel entityNamed: 'file1.cunit::main()')
numberOfLinesOfCode = 6.
self assert: ((mooseModel entityNamed: #'file1.c')
numberOfLinesOfCode = 19).
self assert: ((mooseModel entityNamed: 'file1.cunit')
numberOfLinesOfCode = 19).
-=-=-=-=-=-=-=-=-=-=-=-=
The two last lines are probably the most interesting for you.
Cheers,
Alexandre
On 7 Jan 2010, at 09:23, Cyrille Delaunay wrote:
No, the problem is still present. The xml file corresponding to the file
for which I want to retrieve the information
seems to be well-formed. So, it
is maybe a problem from CAnalyzer.
2010/1/6 Alexandre Bergel <alexandre(a)bergel.eu>
I didnt check, but I think that CAnalyzer needs to access the source and
xml files to compute lines of code. How did you import your model? Where is
it on disk? Did you generate new xml files or use old ones?
No, you do not need the original source code for computing the lines of
code. There is a bijection between srcML XML files and original source code.
This is a great strenght of srcML.
Cyrille, did you solve the problem?
Cheers,
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