Hi Stef,
In general, in the new famix we named variables based on the types they point to.
In this case we have:
ScopingEntity -- Namespace -- Package
In each ScopingEntity we point to other "childScopes" :), but in fact in each Package we point to Packages and in a Namespace we point to Namespaces. So we could leave childScopes as a polymorphic property between Package and Namespace and have the actual implementation in the subclasses.
Cheers, Doru
On 21 Dec 2009, at 19:36, Stéphane Ducasse wrote:
For me childScopes does not reveal its intention. I do not understand what it use for. Stef
On Dec 21, 2009, at 7:04 PM, Tudor Girba wrote:
Hi,
If I have a FAMIXNamespace, how do I obtain a reference to the model that contains this namespace?
namespace mooseModel
FAMIXNamespace has child scopes instead of namespaces, which makes it ugly to define a Glamour tree view on models and their namespaces. I have therefore added the code below, I think it would be a good idea to add that to the core as well.
FAMIXNamespace>>allNamespaces ^ self childScopes
Indeed, this part will probably need rethinking a bit. Probably the best thing is to define childScopes as derived and override it in the subclasses to offer uniform interface between Namespace and Package. So, basically we could have the same pattern as with belongsTo:
FAMIXNamespace>>childScopes <MSEProperty ... > <derived> ^ self namespaces
FAMIXPackage>>childScopes <MSEProperty ... > <derived> ^ self packages
What do you think?
Cheers, Doru
-- www.tudorgirba.com
"No matter how many recipes we know, we still value a chef."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"What is more important: To be happy, or to make happy?"