Le 10/10/2017 à 18:22, Anne Etien a écrit :
Is it the expected behavior? Or do we want that we are not able to ask for outgoing
association if the entity is not source of an association. So for example, instead of
looking for outgoing association of a never source entity, it directly returns an empty
result. Perhaps we could have gain in performance, but be careful with the recursive
query. Indeed, it is not because an entity is never a source that its children are not. So
I don’t know but perhaps we can think to the question before changing.
I think this is the expected behaviour because if you extend a class for
another language and if you add a property referencing an association
you want it to be collected.
Later I may plan to make Famix configurable enough to be able to load
only what is needed for each languages. Maybe at that time we could add
some optimisations based on each languages. But for now I think Famix is
not modular enough.
But maybe I am wrong, if someone has an idea to optimize with the
current famix I would be glad to hear it!
Also, FAMIXSourceAnchor already override some methods to return empty
query results.
Sorry, I am not familiar with shouldNotImplement. If it does the job, why not.
It is just a method you can call and it will open a debugger with an
error saying that the class should not implement the method. If we are
in that case, it means we use the API of the class in the wrong way.
Wait, one question, that I have and I don’t remember the answer. Why FAMIXNamedEntity is
a user of TOODependencyQueries and not of TDependencyQueries and thus why not just
FAMIXType is a user of TOODependencyQueries? Depending on the answer to this question, you
can push up TDependencyQueries or TOODependencyQueries to FAMIXEntity.
I don't have the answer to this question :)
This is also one thing I find weird.
In the beginning TOODependencyQueries was implemented on
FAMIXNamedEntity, FAMIXType and FAMIXBehivouralEntity. Since the last
two inherits from the former, I removed it.
I was planning to talk about it later. I have other refactorings planed
but I do it step by step :)
It was my pleasure :)
Anne
_______________________________________________
Moose-dev mailing list
Moose-dev(a)list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev
--
Cyril Ferlicot
https://ferlicot.fr
http://www.synectique.eu
2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France