Interface ValidationUtils.IModelValidationCallback<R,​T>

  • Type Parameters:
    R - the model root type
    T - the transformation result type
    Enclosing class:
    ValidationUtils

    public static interface ValidationUtils.IModelValidationCallback<R,​T>
    Defines a validation callback to provide the information required for validation.
    Author:
    Holger Eichelberger
    • Method Detail

      • isValidationEnabled

        boolean isValidationEnabled​(java.net.URI uri)
        Returns whether (interactive) validation is enabled. Typically, all model files in a project are considered. However, some build processes such as Maven may copy a model for packaging it. Then the copy of the model may not be valid, as it is not in a model location.
        Parameters:
        uri - the URI
        Returns:
        true if validation is enabled, false else
      • createModel

        TranslationResult<T> createModel​(R root,
                                         java.net.URI uri)
        Creates a model for validation.
        Parameters:
        root - the model root
        uri - the model URI
        Returns:
        the model translation result
      • message

        void message​(ValidationUtils.MessageType type,
                     java.lang.String message,
                     org.eclipse.emf.ecore.EObject source,
                     org.eclipse.emf.ecore.EStructuralFeature feature,
                     int identifier)
        Handles a message.
        Parameters:
        type - the message type
        message - the message text
        source - the message source
        feature - the feature within source
        identifier - an numerical identifier for the message / for testing