Bug 543190

Summary: [Validation Service] Reduce scope of re-validation for child context
Product: [Modeling] ECP Reporter: Christian Damus <give.a.damus>
Component: ValidationAssignee: Christian Damus <give.a.damus>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: eneufeld, jhelming
Version: 1.19.0Keywords: test
Target Milestone: 1.20.0   
Hardware: PC   
OS: Mac OS X   
See Also: https://git.eclipse.org/r/134683
https://git.eclipse.org/c/emfclient/org.eclipse.emf.ecp.core.git/commit/?id=a6f3ed5d109aad69ea6380bf5ad12f50580b5a72
Whiteboard:

Description Christian Damus CLA 2019-01-05 16:46:01 EST
When a child view-model context is created, as for selection of some object in a master-detail table form, the default ValidationService implementation re-validates everything that is presented in the parent context (the master table).  For large datasets with many and/or complex validation rules, this can introduce significant delays in the UI responsiveness on changing selection in tables.

It seems that it should only be necessary to validate the portion of the data-set that becomes visible in the form as a result of the creation of the child context.  And because the validation of those objects may reasonably be expected to affect containers, perhaps also the domain-model of the parent view-model contexts.
Comment 1 Eclipse Genie CLA 2019-01-05 18:08:45 EST
New Gerrit change created: https://git.eclipse.org/r/134683
Comment 3 Christian Damus CLA 2019-01-17 16:40:39 EST
(In reply to Eclipse Genie from comment #2)
> Gerrit change https://git.eclipse.org/r/134683 was merged to [develop].
Comment 4 Jonas Helming CLA 2019-01-30 08:37:30 EST
Should we add the "test" tag here and provide testing information?
Comment 5 Christian Damus CLA 2019-01-31 08:18:44 EST
(In reply to Jonas Helming from comment #4)
> Should we add the "test" tag here and provide testing information?

Indeed.  This could result in regression of behaviour in models that depend on being fully re-validated in order to present problems on elements as they are revealed.  For example, in the case of a higher-level (or even root-level) object checking the consistency of objects within its subtree.  Such is the case, for example, with the common class of scoped uniqueness constraints.

So, for example, applications that use table controls in their form views should check that

- the first column (validation status) shows problems on any elements that should fail validation
- in the case of a master-detail view, that selection of an object shows relevant problems per feature in its detail controls
- that upon editing an object in the table (or in details in case of master-detail view), validation status is updated to clear fixed problems or to present new problems