Management of the children and parents entities in Moose

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Management of the children and parents entities in Moose

CyrilFerlicot
Hi,

Currently the implementation of #children in MooseEntity is really
fragile. In the current implementation, we select all the selectors
matching "all*s" and we merge the results of these methods.

This is fragile because we could have #allContainerFiles that would not
return children. Also it is possible that there is no method matching
this pattern for some children.

In the meanwhile, Anne, Jean-Christophe and Vincent worked in the usage
of the mse properties in order to build more generic algos. There is
currently a #childrenEntities and a #parentEntities methods to get the
children/parents based on the meta-model of the language. I think this
is now stable.

I will deprecate #childrenEntities and #parentEntities and rename them
#children and #parents now.

So, no need to implement some #children methods anymore :)

--
Cyril Ferlicot
https://ferlicot.fr

http://www.synectique.eu
2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Management of the children and parents entities in Moose

Anne Etien
Hi,

Be careful, #children and #childrenEntities do not always provide the same result.
So the deprecation + renaming may have impact.

Nevertheless, I run all tests of Moose + Fame + Famix before putting an halt in MooseEntity>>children and after and all tests remain green.
So the impact of the proposed change may be controlled… or not cover by a test ;o)

Anne

> Le 19 sept. 2017 à 18:59, Cyril Ferlicot D. <[hidden email]> a écrit :
>
> Hi,
>
> Currently the implementation of #children in MooseEntity is really
> fragile. In the current implementation, we select all the selectors
> matching "all*s" and we merge the results of these methods.
>
> This is fragile because we could have #allContainerFiles that would not
> return children. Also it is possible that there is no method matching
> this pattern for some children.
>
> In the meanwhile, Anne, Jean-Christophe and Vincent worked in the usage
> of the mse properties in order to build more generic algos. There is
> currently a #childrenEntities and a #parentEntities methods to get the
> children/parents based on the meta-model of the language. I think this
> is now stable.
>
> I will deprecate #childrenEntities and #parentEntities and rename them
> #children and #parents now.
>
> So, no need to implement some #children methods anymore :)
>
> --
> Cyril Ferlicot
> https://ferlicot.fr
>
> http://www.synectique.eu
> 2 rue Jacques Prévert 01,
> 59650 Villeneuve d'ascq France
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev