Status: New Owner: ---- Labels: Type-Defect Priority-Medium
New issue 778 by fabrizio...@gmail.com: FAMIXAssociation should not implement sourceAnchor http://code.google.com/p/moose-technology/issues/detail?id=778
FAMIXAssociation should not implement sourceAnchor.
Comment #1 on issue 778 by anquetil...@gmail.com: FAMIXAssociation should not implement sourceAnchor http://code.google.com/p/moose-technology/issues/detail?id=778
not so sure.
When you have a big chunk of code, it can be used to find back in the code where an association comes from.
Exemple: verveineJ has an option to not export details of the classes (methods attributes). But, it still exports the dependencies between the classes that come from their methods and/or attributes (class A has x invocations to class B)
In this case, it is nice to have a sourceAnchor on the FamixAssociation to allow Moose to display the source code that created the associations
Comment #2 on issue 778 by fabrizio...@gmail.com: FAMIXAssociation should not implement sourceAnchor http://code.google.com/p/moose-technology/issues/detail?id=778
I agree with your point. Sometimes can be handy to have sourceAnchor. But your are not pointing to the exact location where the association is, do you?
I mean, the implementation of FAMIXAssociation>>>sourceAnchor is: ^self from sourceAnchor
so you are anyway returning the sourceAnchor of the sourced entity containing the invocation right?
So my point is that the only thing you gain by having sourceAnchor defined in FAMIXAssociation is that in your code, instead of send the message sourceAnchor directly on the association, you will have to send the message from sourceAnchor. The information is not lost anyway is it?
Anyway, I wanted to remove sourceAnchor because I'm getting some errors while browsing the source code in the moose panel because some sourceAnchors were broken or because the source language of the file was not define.
So no pain with same gain :)
Updates: Status: Fixed Labels: Component-Famix Milestone-4.7
Comment #3 on issue 778 by tudor.gi...@gmail.com: FAMIXAssociation should not implement sourceAnchor http://code.google.com/p/moose-technology/issues/detail?id=778
Thanks, Fabrizio for noting and fixing this.
Indeed, conceptually FAMIXAssociation>>sourceAnchor breaks the contract of FAMIXSourcedEntity, so it should be removed. The convenience it adds when it comes to browsing, should be solved in the browser, not in the model.