Interface ValidationUpdateListener


  • public interface ValidationUpdateListener
    An alternative validation listener that is most useful in applications that throttle problem reporting, to be notified of all problems found by validation, regardless of limits imposed by the presentation in the editor.
    Since:
    1.22
    • Method Detail

      • validationUpdated

        void validationUpdated​(java.util.Collection<org.eclipse.emf.common.util.Diagnostic> diagnostics)

        Notifies the listener of updates to the model validation state. This is an incremental update: it provides validation status of settings in model objects, including results that explicitly indicate absence of problems (indicating that problems previously reported are resolved). Every diagnostic in the collection has at least two elements in the data list, of which the first two are:

        1. the EObject that owns the feature that was validated
        2. the EStructuralFeature of the object that was validated

        If any feature of any object that was previously reported as having problems no longer has problems, then an Diagnostic.OK diagnostic will be present for that setting. Otherwise, there may be one or more problem diagnostics for that setting. In any case, if the validation state of a setting is changed, then this collection contains the entire current validation state of that setting.

        Parameters:
        diagnostics - the current validation problems in settings (features of objects) that were validated
      • register

        static boolean register​(ValidationService validationService,
                                ValidationUpdateListener listener)
        Register a listener with the given validation service, if it supports it.
        Parameters:
        validationService - a validation service
        listener - the listener to register
        Returns:
        true if the listener was registered; false, otherwise
      • deregister

        static void deregister​(ValidationService validationService,
                               ValidationUpdateListener listener)
        De-register a listener from the given validation service.
        Parameters:
        validationService - a validation service
        listener - the listener to deregister