org.eclipse.xtext.validation
Interface ValidationMessageAcceptor

All Known Implementing Classes:
AbstractCodetemplatesJavaValidator, AbstractDeclarativeValidator, AbstractPureXbaseJavaValidator, AbstractSimpleAntlrJavaValidator, AbstractSimpleExpressionsJavaValidator, AbstractValidationMessageAcceptor, AbstractXbaseJavaValidator, AbstractXbaseWithAnnotationsJavaValidator, AbstractXtend2JavaValidator, ClasspathBasedChecks, CodetemplatesJavaValidator, EarlyExitValidator, FeatureCallValidator, GrammarWithoutLeftRecursionInspector, ImportUriValidator, JvmTypeReferencesValidator, NamesAreUniqueValidator, PredicateUsesUnorderedGroupInspector, PureXbaseJavaValidator, SimpleAntlrJavaValidator, SimpleExpressionsJavaValidator, TemplateValidator, XbaseJavaValidator, XbaseWithAnnotationsJavaValidator, Xtend2JavaValidator, XtendEarlyExitValidator, XtextValidator

public interface ValidationMessageAcceptor

A validation message acceptor provides the minimal necessary API to create error and warning messages that are associated with a feature value or with a range in the input source.

Partial implementations will usually inherit from AbstractValidationMessageAcceptor.

Author:
Sebastian Zarnekow - initial contribution and API

Field Summary
static int INSIGNIFICANT_INDEX
           
 
Method Summary
 void acceptError(java.lang.String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.String code, java.lang.String... issueData)
          Annotate an instance, a feature value, or all feature values with an error.
 void acceptError(java.lang.String message, org.eclipse.emf.ecore.EObject object, int offset, int length, java.lang.String code, java.lang.String... issueData)
          Annotate a range of the resource with an error.
 void acceptInfo(java.lang.String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.String code, java.lang.String... issueData)
          Annotate an instance, a feature value, or all feature values with an info message.
 void acceptInfo(java.lang.String message, org.eclipse.emf.ecore.EObject object, int offset, int length, java.lang.String code, java.lang.String... issueData)
          Annotate a range of the resource with an info message..
 void acceptWarning(java.lang.String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.String code, java.lang.String... issueData)
          Annotate an instance, a feature value, or all feature values with a warning.
 void acceptWarning(java.lang.String message, org.eclipse.emf.ecore.EObject object, int offset, int length, java.lang.String code, java.lang.String... issueData)
          Annotate a range of the resource with a warning.
 

Field Detail

INSIGNIFICANT_INDEX

static final int INSIGNIFICANT_INDEX
See Also:
Constant Field Values
Method Detail

acceptError

void acceptError(java.lang.String message,
                 org.eclipse.emf.ecore.EObject object,
                 org.eclipse.emf.ecore.EStructuralFeature feature,
                 int index,
                 java.lang.String code,
                 java.lang.String... issueData)
Annotate an instance, a feature value, or all feature values with an error.

Parameters:
message - the error message. May not be null.
object - the object or the feature holder. May not be null.
feature - the feature or null if the complete instance should be annotated.
the - index of the erroneous value or -1 if all values are considered to be invalid. The index is ignored if the feature is null or the feature is a single value feature.
code - the optional issue code.
issueData - the optional issue data.

acceptError

void acceptError(java.lang.String message,
                 org.eclipse.emf.ecore.EObject object,
                 int offset,
                 int length,
                 java.lang.String code,
                 java.lang.String... issueData)
Annotate a range of the resource with an error.

Parameters:
message - the error message. May not be null.
offset - the absolute offset in the resource.
length - the length of the erroneous range.
code - the optional issue code.
issueData - the optional issue data.
Throws:
java.lang.IndexOutOfBoundsException - if the offset or the length is invalid.

acceptWarning

void acceptWarning(java.lang.String message,
                   org.eclipse.emf.ecore.EObject object,
                   org.eclipse.emf.ecore.EStructuralFeature feature,
                   int index,
                   java.lang.String code,
                   java.lang.String... issueData)
Annotate an instance, a feature value, or all feature values with a warning.

Parameters:
message - the warning message. May not be null.
object - the object or the feature holder. May not be null.
feature - the feature or null if the complete instance should be annotated.
the - index of the relevant value or -1 if all values are considered to be affected. The index is ignored if the feature is null or the feature is a single value feature.
code - the optional issue code.
issueData - the optional issue data.

acceptWarning

void acceptWarning(java.lang.String message,
                   org.eclipse.emf.ecore.EObject object,
                   int offset,
                   int length,
                   java.lang.String code,
                   java.lang.String... issueData)
Annotate a range of the resource with a warning.

Parameters:
message - the warning message. May not be null.
offset - the absolute offset in the resource.
length - the length of the invalid range.
code - the optional issue code.
issueData - the optional issue data.
Throws:
java.lang.IndexOutOfBoundsException - if the offset or the length is invalid.

acceptInfo

void acceptInfo(java.lang.String message,
                org.eclipse.emf.ecore.EObject object,
                org.eclipse.emf.ecore.EStructuralFeature feature,
                int index,
                java.lang.String code,
                java.lang.String... issueData)
Annotate an instance, a feature value, or all feature values with an info message.

Parameters:
message - the info message. May not be null.
object - the object or the feature holder. May not be null.
feature - the feature or null if the complete instance should be annotated.
the - index of the interesting value or -1 if all values are considered to be interesting. The index is ignored if the feature is null or the feature is a single value feature.
code - the optional issue code.
issueData - the optional issue data.

acceptInfo

void acceptInfo(java.lang.String message,
                org.eclipse.emf.ecore.EObject object,
                int offset,
                int length,
                java.lang.String code,
                java.lang.String... issueData)
Annotate a range of the resource with an info message..

Parameters:
message - the info message. May not be null.
offset - the absolute offset in the resource.
length - the length of the annotated range.
code - the optional issue code.
issueData - the optional issue data.
Throws:
java.lang.IndexOutOfBoundsException - if the offset or the length is invalid.