Status: New Owner: ---- Labels: Type-Defect Priority-Medium
New issue 557 by vhane...@gmail.com: FAMIXComment wrongly initialized http://code.google.com/p/moose-technology/issues/detail?id=557
Describe the problem: what do you get? what do you expect?
"FAMIXComment new printString" raise an error. It is wrongly initialized
Updates: Labels: Component-Famix Milestone-4.4
Comment #1 on issue 557 by tudor.gi...@gmail.com: FAMIXComment wrongly initialized http://code.google.com/p/moose-technology/issues/detail?id=557
It is not wrongly initialized. It is only the printOn: that is not guarded.
Comment #2 on issue 557 by vhane...@gmail.com: FAMIXComment wrongly initialized http://code.google.com/p/moose-technology/issues/detail?id=557
Same thing for HismoCoChangePattern, FAMIXInvocation, FAMIXType and many other subclasses.
This is now fixed in: - Famix-Core-VanessaPena.142 - Famix-Implementation-VanessaPena.78 - Famix-ManifestMf-VanessaPena.7 - Moose-Hismo-VanessaPena.37 - Moose-Tests-Core-VanessaPena.26
Comment #3 on issue 557 by tudor.gi...@gmail.com: FAMIXComment wrongly initialized http://code.google.com/p/moose-technology/issues/detail?id=557
Please stop for a second before committing anymore in the meta-model. These are core packages that should be handled with care.
The fixes you propose do not go in the right direction. Having
iniitialize signature = 'nosignature'
might make your test green, but it is not the intended behavior. At the very least it should be a constant, but at the moment we would like to know if something is not initialized when loading a model. So, I do not want the instance variable to be initialized by default.
In any case, your use case is to get printString working, which is a good thing. But this should be done by guard conditions.
Comment #4 on issue 557 by vhane...@gmail.com: FAMIXComment wrongly initialized http://code.google.com/p/moose-technology/issues/detail?id=557
Sorry if we (i.e., I and Alexandre) were a bit hasty on this. We were concerned with a proper initialization of famix classes. Would it be better to make printOn: not fail in case of a nil signature?
Thanks for double checking what we have done.
Comment #5 on issue 557 by tudor.gi...@gmail.com: FAMIXComment wrongly initialized http://code.google.com/p/moose-technology/issues/detail?id=557
My pleasure. Thanks for doing this.
Indeed, guarding printOn:, mooseDisplayStringOn:, mooseNameOn: would be the desired solution at this moment.
Comment #6 on issue 557 by vhane...@gmail.com: FAMIXComment wrongly initialized http://code.google.com/p/moose-technology/issues/detail?id=557
Hello,
Can you check on MooseElement >> description as we have a test and it arises an error, please? Thanks.
Cheers.
Comment #7 on issue 557 by tudor.gi...@gmail.com: FAMIXComment wrongly initialized http://code.google.com/p/moose-technology/issues/detail?id=557
Thanks. I will go over this on Saturday.
Comment #8 on issue 557 by tudor.gi...@gmail.com: FAMIXComment wrongly initialized http://code.google.com/p/moose-technology/issues/detail?id=557
I do not understand the meaning of MooseElement>>description and of testDescription.
testDescription | element stream | element := MooseElement new. stream := WriteStream on: String new. self assert: (stream description isContainer). self assert: (stream description isKindOf: MAPriorityContainer).
Actually, there is a problem with #description, because of Magritte which is loaded by Glamour. Magritte defines Object>>description and this returns a MagritteDescription. This conflicts with MooseEntity>>description which returns a string.
So, the solution is to rename MooseEntity>>description to MooseEntity>>stringDescription or something like that, but this is a deep change and I would not do it now.
In any case the above mentioned test is wrong in Moose-Tests-Core because it should not know about Magritte. So, I removed it.
Comment #9 on issue 557 by alexandr...@gmail.com: FAMIXComment wrongly initialized http://code.google.com/p/moose-technology/issues/detail?id=557
Ok. It makes sense
Comment #10 on issue 557 by tudor.gi...@gmail.com: FAMIXComment wrongly initialized http://code.google.com/p/moose-technology/issues/detail?id=557
I also reworked a bit the MooseElementTests.
Updates: Status: Fixed
Comment #11 on issue 557 by tudor.gi...@gmail.com: FAMIXComment wrongly initialized http://code.google.com/p/moose-technology/issues/detail?id=557
The tests related to this issue are green.