Interface ValidationUtils.IModelValidationCallback<R,T>
- Type Parameters:
R- the model root typeT- 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 Summary
Modifier and TypeMethodDescriptioncreateModel(R root, URI uri) Creates a model for validation.booleanisValidationEnabled(URI uri) Returns whether (interactive) validation is enabled.voidmessage(ValidationUtils.MessageType type, String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, int identifier) Handles a message.voidprint(TranslationResult<T> result, Writer out) Prints out the translation result.
-
Method Details
-
isValidationEnabled
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:
trueif validation is enabled,falseelse
-
createModel
Creates a model for validation.- Parameters:
root- the model rooturi- 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 typemessage- the message textsource- the message sourcefeature- the feature withinsourceidentifier- an numerical identifier for the message / for testing
-
print
Prints out the translation result.- Parameters:
result- the translation result obtained fromcreateModel(Object, java.net.URI)out- the output writer
-