Replacement of ConstraintFunction_ReferentSearchScope_Validator?

Hi all,

Starting MPS 2017.2.1 NodeReferentConstraint does not contain validator (ConstraintFunction_ReferentSearchScope_Validator) as child.

Is there a replacement for it?

I was using validator for big models where is much less time consuming to use validator for each node rather then to calculate the whole scope for each node. As far as I know these constraints are calculated every time a root-node is opened or refreshed. For root-nodes with larger amount of descendants this can take a while.

Thank you in advance.

Best regards,

Josef

1 comment
Comment actions Permalink

Hi, Josef!

Unfortunately, now there is no ready-to-use replacement for `validator` query. To make reference validation efficient you could define scope factory that returns a scope with overridden `contains` method. For instance, you can try this:

It looks cumbersome but it's what you are needed: scope evaluates lazily and reference validation doesn't trigger calculation of elements in scope. 

I filed the issue for introducing a replacement for `validator` query.

0

Please sign in to leave a comment.