Le 30 juil. 2015 à 17:29, stephan <stephan(a)stack.nl> a écrit :
On 30-07-15 17:03, Jean-Christophe Bach wrote:
We have
to find a solution because I do not want to rely on strings :).
How about overriding the definition of parentPackage in FAMIXMethod?
Perhaps a
better solution would be to remove parentPackage from
FAMIXNamedEntity and to put it into FAMIXClass and FAMIXMethod.
There are a lot of languages that allow other nesting structures.
I am not
sure to right understand your remark. It is because the concept of Package does not exist
in any language that we suggested to move down parentPackage from FAMIXNamedEntity where
it is now to FAMIXClass and FAMIXMethod (since anyway, it is for these two concepts only
that the importers put values).
Moreover, the existence of other nesting structures is not a problem for the new API. For
this new API, you have to specify, currently in the annotation class method of each
FAMIXNamedEntity, what is its parent selectors. The atScope: method (and now also the
toScope:) relies on this pragma. Finally, if a function functionA is nested into another
functionB, the following query: functionA atScope: FAMIXFunction ==> functionA since it
is already a function.
One of the numerous reasons we initially developed MooseQuery was that I have a project of
SQL code analysis for which none of the existing MooseChef query worked. With MooseQuery,
you just have to add pragmas of the parent selectors and you can use all the power of the
requests.
Anne
Stephan
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev