Hi,

Are you talking about MSEParentSelector: pragma? As in:
annotation
<MSEClass: #Type super: #FAMIXContainerEntity>
<package: #FAMIX>
<MSEParentSelector: #container >
<MSEParentSelector: #parentPackage >
^self

I made such modifications one year ago almost (if my modifications are the last ones) after discussions on the mailing list and announcing it.
This is use for MooseQuery. And will be certainly used in the next version of FamixDiff. The idea was to have a meta description to know which type is containing the studied type. 
If you prefer to do it on the instance side and not in the class side in the annotation method, no problem. I don’t see in which way, the actual version is not extensible. If you prefer to call it MSEParentProperty and not MSEParentSelector, no problem neither.
In my image that is based on Moose6.0 (of last Friday), I don’t have FAMIXType>>parentSelectors.
But perhaps we are not talking about the same thing.

Cheers,
Anne

Le 18 sept. 2016 à 11:09, Tudor Girba <tudor@tudorgirba.com> a écrit :

Hi,

I just saw that the way the parent selectors are being defined was changed. In general, please announce deep changes like these on the mailing list.

If I understand correctly, the goal was to make it easier for extensions to specify the parentSelectors. This is a good goal, but there are two problems with the current solution:

1. The parentSelectors should be extensible. Right now, they are defined in one method returning a collection of strings. Instead, it would be better to have them described directly in the selector method. For example, we could have:

FAMIXType>>container
<MSEProperty: #container type: #FAMIXContainerEntity opposite: #types>
<MSEComment: 'Container entity to which this type belongs to. Container is a namespace, not a package (Smalltalk).'>
<MSEParentProperty>
^container

This would also allow us to extend existing classes with annotations that can be selectors.


2. Right now, the parentSelectors are defined on the instance side as an MSE property:

FAMIXType>>parentSelectors
<MSEProperty: #parentSelectors type: #String>
<multivalued>
^ #(container parentPackage)

This is incorrect given that they describe the type, not the instance. For example, one consequence is that now we serialize this information (check MooseModel>>testExport which fails right now). Instead, let’s go for solution from point 1.

What do you think?


Cheers,
Doru



--
www.tudorgirba.com
www.feenk.com

"It's not how it is, it is how we see it."

_______________________________________________
Moose-dev mailing list
Moose-dev@list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev