Package com._1c.g5.v8.dt.bsl.validation
Class CustomValidationMessageAcceptor
- java.lang.Object
- 
- com._1c.g5.v8.dt.bsl.validation.CustomValidationMessageAcceptor
 
- 
- All Implemented Interfaces:
- org.eclipse.xtext.validation.ValidationMessageAcceptor
 
 public class CustomValidationMessageAcceptor extends Object implements org.eclipse.xtext.validation.ValidationMessageAcceptor Implementation ofValidationMessageAcceptorfor creating validation diagnostics for Bsl language. This class has some useful methods for creating validation diagnostics by language model object and itsEStructuralFeature
- 
- 
Constructor SummaryConstructors Constructor Description CustomValidationMessageAcceptor(org.eclipse.emf.common.util.DiagnosticChain diagnostic, org.eclipse.xtext.validation.CheckType checkType)Constructor
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacceptError(String message, org.eclipse.emf.ecore.EObject object, int offset, int length, String code, String... issueData)voidacceptError(String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData)voidacceptInfo(String message, org.eclipse.emf.ecore.EObject object, int offset, int length, String code, String... issueData)voidacceptInfo(String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData)voidacceptWarning(String message, org.eclipse.emf.ecore.EObject object, int offset, int length, String code, String... issueData)voidacceptWarning(String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData)protected org.eclipse.emf.common.util.DiagnosticcreateDiagnostic(org.eclipse.xtext.diagnostics.Severity severity, String message, org.eclipse.emf.ecore.EObject object, int offset, int length, String code, String... issueData)CreatesDiagnosticby model objectprotected org.eclipse.emf.common.util.DiagnosticcreateDiagnostic(org.eclipse.xtext.diagnostics.Severity severity, String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData)CreatesDiagnosticby model object and itsEStructuralFeaturevoiderror(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature)Creates error diagnostic withmessagefor value corresponding tofeatureof objectsourcevoiderror(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, int index)Creates error diagnostic withmessagefor value corresponding tofeatureof objectsourcevoiderror(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData)Creates error diagnostic withmessagefor value corresponding tofeatureof objectsourcevoiderror(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, String code, String... issueData)Creates error diagnostic withmessagefor value corresponding tofeatureof objectsourcevoidinfo(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature)Creates information diagnostic withmessagefor value corresponding tofeatureof objectsourcevoidinfo(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, int index)Creates information diagnostic withmessagefor value corresponding tofeatureof objectsourcevoidinfo(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData)Creates information diagnostic withmessagefor value corresponding tofeatureof objectsourcestatic inttoDiagnosticSeverity(org.eclipse.xtext.diagnostics.Severity severity)Returns code of validation diagnostic bySeverityvoidwarning(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature)Creates warning diagnostic withmessagefor value corresponding tofeatureof objectsourcevoidwarning(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, int index)Creates warning diagnostic withmessagefor value corresponding tofeatureof objectsourcevoidwarning(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData)Creates warning diagnostic withmessagefor value corresponding tofeatureof objectsourcevoidwarning(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, String code, String... issueData)Creates warning diagnostic withmessagefor value corresponding tofeatureof objectsource
 
- 
- 
- 
Constructor Detail- 
CustomValidationMessageAcceptorpublic CustomValidationMessageAcceptor(org.eclipse.emf.common.util.DiagnosticChain diagnostic, org.eclipse.xtext.validation.CheckType checkType)Constructor- Parameters:
- diagnostic- accumulator of validation diagnostics. All of creating diagnostic will be added to it. Can't be- null
- checkType- actual validation type, can't be- null
 
 
- 
 - 
Method Detail- 
toDiagnosticSeveritypublic static int toDiagnosticSeverity(org.eclipse.xtext.diagnostics.Severity severity) Returns code of validation diagnostic bySeverity- Parameters:
- severity- converting- Severityto code of validation diagnostic, cannot be- null
- Returns:
- code of validation diagnostic by Severity. Supports onlyDiagnostic.ERROR,Diagnostic.WARNING,Diagnostic.INFOin other casesIllegalArgumentExceptionwill be thrown
 
 - 
acceptErrorpublic void acceptError(String message, org.eclipse.emf.ecore.EObject object, int offset, int length, String code, String... issueData) - Specified by:
- acceptErrorin interface- org.eclipse.xtext.validation.ValidationMessageAcceptor
 
 - 
acceptWarningpublic void acceptWarning(String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData) - Specified by:
- acceptWarningin interface- org.eclipse.xtext.validation.ValidationMessageAcceptor
 
 - 
acceptInfopublic void acceptInfo(String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData) - Specified by:
- acceptInfoin interface- org.eclipse.xtext.validation.ValidationMessageAcceptor
 
 - 
acceptErrorpublic void acceptError(String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData) - Specified by:
- acceptErrorin interface- org.eclipse.xtext.validation.ValidationMessageAcceptor
 
 - 
acceptWarningpublic void acceptWarning(String message, org.eclipse.emf.ecore.EObject object, int offset, int length, String code, String... issueData) - Specified by:
- acceptWarningin interface- org.eclipse.xtext.validation.ValidationMessageAcceptor
 
 - 
acceptInfopublic void acceptInfo(String message, org.eclipse.emf.ecore.EObject object, int offset, int length, String code, String... issueData) - Specified by:
- acceptInfoin interface- org.eclipse.xtext.validation.ValidationMessageAcceptor
 
 - 
infopublic void info(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature) Creates information diagnostic withmessagefor value corresponding tofeatureof objectsource- Parameters:
- message- diagnostic message, can't be- null
- source- model object each value corresponding to- featurewill be annotated, can'be- null
- feature- feature of the object- source. Value corresponding for it will be annotated, can'be- null
 
 - 
infopublic void info(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, int index) Creates information diagnostic withmessagefor value corresponding tofeatureof objectsource- Parameters:
- message- diagnostic message, can't be- null
- source- model object each value corresponding to- featurewill be annotated, can'be- null
- feature- feature of the object- source. Value corresponding for it will be annotated, can'be- null
- index- index of annotating object in collection of values corresponding to- feature. Default value is- -1
 
 - 
infopublic void info(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData) Creates information diagnostic withmessagefor value corresponding tofeatureof objectsource- Parameters:
- message- diagnostic message, can't be- null
- source- model object each value corresponding to- featurewill be annotated, can'be- null
- feature- feature of the object- source. Value corresponding for it will be annotated, can'be- null
- index- index of annotating object in collection of values corresponding to- feature. Default value is- -1
- code- error code corresponding to creating diagnostic. This code can be used for creating quick fixes, can be- null
- issueData- additional data attaching to diagnostic, can't be- null
 
 - 
warningpublic void warning(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature) Creates warning diagnostic withmessagefor value corresponding tofeatureof objectsource- Parameters:
- message- diagnostic message, can't be- null
- source- model object each value corresponding to- featurewill be annotated, can'be- null
- feature- feature of the object- source. Value corresponding for it will be annotated, can'be- null
 
 - 
warningpublic void warning(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, int index) Creates warning diagnostic withmessagefor value corresponding tofeatureof objectsource- Parameters:
- message- diagnostic message, can't be- null
- source- model object each value corresponding to- featurewill be annotated, can'be- null
- feature- feature of the object- source. Value corresponding for it will be annotated, can'be- null
- index- index of annotating object in collection of values corresponding to- feature. Default value is- -1
 
 - 
warningpublic void warning(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData) Creates warning diagnostic withmessagefor value corresponding tofeatureof objectsource- Parameters:
- message- diagnostic message, can't be- null
- source- model object each value corresponding to- featurewill be annotated, can'be- null
- feature- feature of the object- source. Value corresponding for it will be annotated, can'be- null
- index- index of annotating object in collection of values corresponding to- feature. Default value is- -1
- code- error code corresponding to creating diagnostic. This code can be used for creating quick fixes, can be- null
- issueData- additional data attaching to diagnostic, can't be- null
 
 - 
warningpublic void warning(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, String code, String... issueData) Creates warning diagnostic withmessagefor value corresponding tofeatureof objectsource- Parameters:
- message- diagnostic message, can't be- null
- source- model object each value corresponding to- featurewill be annotated, can'be- null
- feature- feature of the object- source. Value corresponding for it will be annotated, can'be- null
- code- error code corresponding to creating diagnostic. This code can be used for creating quick fixes, can be- null
- issueData- additional data attaching to diagnostic, can't be- null
 
 - 
errorpublic void error(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature) Creates error diagnostic withmessagefor value corresponding tofeatureof objectsource- Parameters:
- message- diagnostic message, can't be- null
- source- model object each value corresponding to- featurewill be annotated, can'be- null
- feature- feature of the object- source. Value corresponding for it will be annotated, can'be- null
 
 - 
errorpublic void error(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, int index) Creates error diagnostic withmessagefor value corresponding tofeatureof objectsource- Parameters:
- message- diagnostic message, can't be- null
- source- model object each value corresponding to- featurewill be annotated, can'be- null
- feature- feature of the object- source. Value corresponding for it will be annotated, can'be- null
- index- index of annotating object in collection of values corresponding to- feature. Default value is- -1
 
 - 
errorpublic void error(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, String code, String... issueData) Creates error diagnostic withmessagefor value corresponding tofeatureof objectsource- Parameters:
- message- diagnostic message, can't be- null
- source- model object each value corresponding to- featurewill be annotated, can'be- null
- feature- feature of the object- source. Value corresponding for it will be annotated, can'be- null
- code- error code corresponding to creating diagnostic. This code can be used for creating quick fixes, can be- null
- issueData- additional data attaching to diagnostic, can't be- null
 
 - 
errorpublic void error(String message, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData) Creates error diagnostic withmessagefor value corresponding tofeatureof objectsource- Parameters:
- message- diagnostic message, can't be- null
- source- model object each value corresponding to- featurewill be annotated, can'be- null
- feature- feature of the object- source. Value corresponding for it will be annotated, can'be- null
- index- index of annotating object in collection of values corresponding to- feature. Default value is- -1
- code- error code corresponding to creating diagnostic. This code can be used for creating quick fixes, can be- null
- issueData- additional data attaching to diagnostic, can't be- null
 
 - 
createDiagnosticprotected org.eclipse.emf.common.util.Diagnostic createDiagnostic(org.eclipse.xtext.diagnostics.Severity severity, String message, org.eclipse.emf.ecore.EObject object, int offset, int length, String code, String... issueData)CreatesDiagnosticby model object- Parameters:
- severity- type of creating diagnostic, can't be- null
- message- message of creating diagnostic, can't be- null
- object- annotated model object by creating diagnostic, can't be- null
- offset- the starting offset of creating diagnostic in annotating resource
- length- the length of creating diagnostic in annotating resource
- code- error code corresponding to creating diagnostic. This code can be used for creating quick fixes, can be- null
- issueData- additional data attaching to diagnostic, can't be- null
- Returns:
- creating diagnostic, never null
 
 - 
createDiagnosticprotected org.eclipse.emf.common.util.Diagnostic createDiagnostic(org.eclipse.xtext.diagnostics.Severity severity, String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData)CreatesDiagnosticby model object and itsEStructuralFeature- Parameters:
- severity- type of creating diagnostic, can't be- null
- message- message of creating diagnostic, can't be- null
- object- annotated model object by creating diagnostic, can't be- null
- feature- feature of the object- source. Value corresponding for it will be annotated, can'be- null
- index- index of annotating object in collection of values corresponding to- feature. Default value is- -1
- code- error code corresponding to creating diagnostic. This code can be used for creating quick fixes, can be- null
- issueData- additional data attaching to diagnostic, can't be- null
- Returns:
- creating diagnostic, never null
 
 
- 
 
-