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 Details

    • isValidationEnabled

      boolean isValidationEnabled(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, 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, 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
    • print

      void print(TranslationResult<T> result, Writer out)
      Prints out the translation result.
      Parameters:
      result - the translation result obtained from createModel(Object, java.net.URI)
      out - the output writer