org.eclipse.gef.dot.internal.language.validation

## Class DotSubgrammarValidationMessageAcceptor

- java.lang.Object
- - org.eclipse.gef.dot.internal.language.validation.DotSubgrammarValidationMessageAcceptor

All Implemented Interfaces:
  org.eclipse.xtext.validation.ValidationMessageAcceptor

    public class DotSubgrammarValidationMessageAcceptor
    extends java.lang.Object
    implements org.eclipse.xtext.validation.ValidationMessageAcceptor

This class provides a ValidationMessageAcceptor to be used with sub grammars. It can be used when validating the main grammar to translate validation warnings/errors.

### Field Summary

### Fields inherited from interface org.eclipse.xtext.validation.ValidationMessageAcceptor

`INSIGNIFICANT_INDEX`

### Constructor Summary

Constructors
Constructor and Description
`DotSubgrammarValidationMessageAcceptor(org.eclipse.gef.dot.internal.language.dot.Attribute attribute, org.eclipse.emf.ecore.EStructuralFeature hostingFeature, java.lang.String userReadableIdentifier, org.eclipse.xtext.validation.ValidationMessageAcceptor hostMessageAcceptor, int internalOffset)` Constructs a Validation Message acceptor to 'translate' issues while validating a sub grammar.

### Method Summary

All Methods Instance Methods Concrete Methods
`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)`
`void` `acceptError(java.lang.String message, org.eclipse.emf.ecore.EObject object, int offset, int length, java.lang.String code, java.lang.String... issueData)`
`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)`
`void` `acceptInfo(java.lang.String message, org.eclipse.emf.ecore.EObject object, int offset, int length, java.lang.String code, java.lang.String... issueData)`
`void` `acceptSyntaxError(org.eclipse.xtext.nodemodel.INode error)` Helper Method to allow this message acceptor to handle syntax errors issued while parsing the sub grammar as validation issues of the main grammar.
`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)`
`void` `acceptWarning(java.lang.String message, org.eclipse.emf.ecore.EObject object, int offset, int length, java.lang.String code, java.lang.String... issueData)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DotSubgrammarValidationMessageAcceptor

    public DotSubgrammarValidationMessageAcceptor(org.eclipse.gef.dot.internal.language.dot.Attribute attribute,
                                                  org.eclipse.emf.ecore.EStructuralFeature hostingFeature,
                                                  java.lang.String userReadableIdentifier,
                                                  org.eclipse.xtext.validation.ValidationMessageAcceptor hostMessageAcceptor,
                                                  int internalOffset)

Constructs a Validation Message acceptor to 'translate' issues while validating a sub grammar.

Parameters:
  `attribute` - The attribute in the main grammar that hosts the sub grammar
  `hostingFeature` - Can be null. If set, needs to be unique within hostingEObject (not a list, ...).
  `userReadableIdentifier` - A name for the sub grammar understood by the user
  `hostMessageAcceptor` - The validationMessageAcceptor of the host grammar
  `internalOffset` - Offset from begin of feature

### Method Detail

#### acceptSyntaxError

    public void acceptSyntaxError(org.eclipse.xtext.nodemodel.INode error)

Helper Method to allow this message acceptor to handle syntax errors issued while parsing the sub grammar as validation issues of the main grammar.

Parameters:
  `error` - Error node from parsing.

#### acceptError

    public 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)

Specified by:
  `acceptError` in interface `org.eclipse.xtext.validation.ValidationMessageAcceptor`

#### acceptError

    public void acceptError(java.lang.String message,
                            org.eclipse.emf.ecore.EObject object,
                            int offset,
                            int length,
                            java.lang.String code,
                            java.lang.String... issueData)

Specified by:
  `acceptError` in interface `org.eclipse.xtext.validation.ValidationMessageAcceptor`

#### acceptInfo

    public 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)

Specified by:
  `acceptInfo` in interface `org.eclipse.xtext.validation.ValidationMessageAcceptor`

#### acceptInfo

    public void acceptInfo(java.lang.String message,
                           org.eclipse.emf.ecore.EObject object,
                           int offset,
                           int length,
                           java.lang.String code,
                           java.lang.String... issueData)

Specified by:
  `acceptInfo` in interface `org.eclipse.xtext.validation.ValidationMessageAcceptor`

#### acceptWarning

    public 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)

Specified by:
  `acceptWarning` in interface `org.eclipse.xtext.validation.ValidationMessageAcceptor`

#### acceptWarning

    public void acceptWarning(java.lang.String message,
                              org.eclipse.emf.ecore.EObject object,
                              int offset,
                              int length,
                              java.lang.String code,
                              java.lang.String... issueData)

Specified by:
  `acceptWarning` in interface `org.eclipse.xtext.validation.ValidationMessageAcceptor`