|
|
|
|
|
|
Re: Scoping a feature call [message #1759042 is a reply to message #1759041] |
Wed, 05 April 2017 14:04 |
|
this has todo with type computation etc what xbase does.
=> if yiu would actually create xassignment code it would reuse the existing code
(you can have a look at xbasetypecomputer and xbasescopeprovider(featurescopes classes etc -> i cannot give you an exact line since i dont know)
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
Re: Scoping a feature call [message #1759070 is a reply to message #1759046] |
Wed, 05 April 2017 20:04 |
Daniel Cardin Messages: 109 Registered: July 2009 |
Senior Member |
|
|
OK. Status report
The XAssignment doesn't work at all, it assume a million things about the rule.
For once, I really properly understood the scoping. So this is how I did it:
Assignment returns xbase::XExpression:
{Assignment}
'set' feature=[types::JvmIdentifiableElement|FeatureCallID] ('.' address=DotExpression)? ('@' attribute=[modelDsl::Attribute] ('.' key=ID)?)?
op=('='|':=')
value=(XExpression|XBlockExpression|Measure)
;
So it's still just an XExpression. But in the scoping for Assignment__feature what I do is I create a FilteringScope on getScope(context, XbasePackage.Literals.XABSTRACT_FEATURE_CALL_FEATURE)
In the filter I can remove all features that are not Property references.
Thanks for your suggestions
Daniel
[Updated on: Wed, 05 April 2017 20:08] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.05138 seconds