Community
Participate
Working Groups
The ValidationService (the view-model service one, not the core one) allows injection of diagnostics via ValidationProviders, including registration of such providers on an extension point. In my private client application, I need to register a ValidationProvider but this provider needs additional services from the context. However, the ValidationProvider protocol is only asked to provide a list of diagnostics for an EObject without any other context: List<Diagnostic> validate(EObject eObject); (from Validator in the core). Even if the view model context could be inferred from the EObject in some cases, in others it may not be inferrable (e.g., if it's an object in the EPackage registry). And besides, it would be nice for a provider to be called back when it is added to the ValidationService to tell it what the context is, so that it can set up dependencies.
New Gerrit change created: https://git.eclipse.org/r/152093
Gerrit change https://git.eclipse.org/r/152093 was merged to [develop]. Commit: http://git.eclipse.org/c/emfclient/org.eclipse.emf.ecp.core.git/commit/?id=ff64c1f8bf51a56c79abf89d594fa201c46d6ec0
(In reply to Eclipse Genie from comment #2) > Gerrit change https://git.eclipse.org/r/152093 was merged to [develop]. This change adds new API to the org.eclipse.emf.ecp.view.spi.validation,ValidationProvider type in the form of default methods that implementors may wish to override to access new context information.
Verified in the 1230_201911062218 build.