Class AbstractLegacyDeclarativeValidator
java.lang.Object
org.eclipse.xtext.validation.AbstractInjectableValidator
org.eclipse.xtext.validation.AbstractDeclarativeValidator
com._1c.g5.modeling.xtext.validation.AbstractModelDeclarativeValidator
com._1c.g5.v8.dt.validation.legacy.AbstractLegacyDeclarativeValidator
- All Implemented Interfaces:
org.eclipse.emf.ecore.EValidator,org.eclipse.xtext.validation.ValidationMessageAcceptor
- Direct Known Subclasses:
BslJavaValidator,FormValidator,GraphicalSchemeValidator,MdExtensionValidator,MdValidator
Abstract legacy declarative validator.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.xtext.validation.AbstractDeclarativeValidator
org.eclipse.xtext.validation.AbstractDeclarativeValidator.MethodWrapper, org.eclipse.xtext.validation.AbstractDeclarativeValidator.State, org.eclipse.xtext.validation.AbstractDeclarativeValidator.StateAccessNested classes/interfaces inherited from interface org.eclipse.emf.ecore.EValidator
org.eclipse.emf.ecore.EValidator.Descriptor, org.eclipse.emf.ecore.EValidator.PatternMatcher, org.eclipse.emf.ecore.EValidator.Registry, org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider, org.eclipse.emf.ecore.EValidator.ValidationDelegate -
Field Summary
Fields inherited from class org.eclipse.xtext.validation.AbstractInjectableValidator
CURRENT_LANGUAGE_NAME, ISSUE_SEVERITIESFields inherited from interface org.eclipse.emf.ecore.EValidator
MARKER, RELATED_URIS_ATTRIBUTE, URI_ATTRIBUTEFields inherited from interface org.eclipse.xtext.validation.ValidationMessageAcceptor
INSIGNIFICANT_INDEX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidacceptError(String message, org.eclipse.emf.ecore.EObject object, int offset, int length, String code, String... issueData) final voidacceptError(String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData) final voidacceptInfo(String message, org.eclipse.emf.ecore.EObject object, int offset, int length, String code, String... issueData) final voidacceptInfo(String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData) final voidacceptWarning(String message, org.eclipse.emf.ecore.EObject object, int offset, int length, String code, String... issueData) final voidacceptWarning(String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData) protected voidaddIssueToState(String issueCode, String message, org.eclipse.emf.ecore.EStructuralFeature feature) protected voidcheckIsFromCurrentlyCheckedResource(org.eclipse.emf.ecore.EObject object) protected final 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) protected final 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) protected voiderror(String message, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData) protected final org.eclipse.xtext.validation.CheckModeprotected final Methodprotected final org.eclipse.emf.ecore.EObjectfinal List<org.eclipse.emf.ecore.EPackage>Returns list ofEPackages for wich this validator will be registered.final voidinternalValidate(Method method, org.eclipse.emf.ecore.EObject object, Map<Object, Object> context, Consumer<org.eclipse.emf.common.util.Diagnostic> diagnosticConsumer) Deprecated.("Remove the method once all legacy checks are moved to the normal plugin-based ones")protected final inttoDiagnosticSeverity(org.eclipse.xtext.diagnostics.Severity severity) Methods inherited from class com._1c.g5.modeling.xtext.validation.AbstractModelDeclarativeValidator
getCurrentLanguage, getEPackagesMethods inherited from class org.eclipse.xtext.validation.AbstractDeclarativeValidator
addIssue, addIssue, addIssue, addIssue, addIssue, checkDone, createMethodWrapper, error, error, error, error, error, error, error, getCancelIndicator, getChain, getIssueSeverities, getMessageAcceptor, guard, handleExceptionDuringValidation, info, info, info, info, info, info, info, info, internalValidate, isIgnored, newInstance, setInjector, setMessageAcceptor, warning, warning, warning, warning, warning, warning, warning, warningMethods inherited from class org.eclipse.xtext.validation.AbstractInjectableValidator
isLanguageSpecific, isResponsible, register, validate, validate, validate
-
Constructor Details
-
AbstractLegacyDeclarativeValidator
public AbstractLegacyDeclarativeValidator()
-
-
Method Details
-
internalValidate
@Deprecated public final void internalValidate(Method method, org.eclipse.emf.ecore.EObject object, Map<Object, Object> context, Consumer<org.eclipse.emf.common.util.Diagnostic> diagnosticConsumer) Deprecated.("Remove the method once all legacy checks are moved to the normal plugin-based ones")Invokes the validation method. Note: Method should not be used in a normal flow. It is called from LegacyCheckAdapter in order to map legacy validation checks to the new approach- Parameters:
method- the method to invoke, cannot benullobject- the target object being validated, cannot benullcontext- the validation context, cannot benulldiagnosticConsumer- the diagnostic consumer used to issues creation, cannot benull
-
acceptError
public final 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 interfaceorg.eclipse.xtext.validation.ValidationMessageAcceptor- Overrides:
acceptErrorin classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-
acceptWarning
public final 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 interfaceorg.eclipse.xtext.validation.ValidationMessageAcceptor- Overrides:
acceptWarningin classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-
acceptInfo
public final 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 interfaceorg.eclipse.xtext.validation.ValidationMessageAcceptor- Overrides:
acceptInfoin classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-
acceptError
public final void acceptError(String message, org.eclipse.emf.ecore.EObject object, int offset, int length, String code, String... issueData) - Specified by:
acceptErrorin interfaceorg.eclipse.xtext.validation.ValidationMessageAcceptor- Overrides:
acceptErrorin classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-
acceptWarning
public final void acceptWarning(String message, org.eclipse.emf.ecore.EObject object, int offset, int length, String code, String... issueData) - Specified by:
acceptWarningin interfaceorg.eclipse.xtext.validation.ValidationMessageAcceptor- Overrides:
acceptWarningin classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-
acceptInfo
public final void acceptInfo(String message, org.eclipse.emf.ecore.EObject object, int offset, int length, String code, String... issueData) - Specified by:
acceptInfoin interfaceorg.eclipse.xtext.validation.ValidationMessageAcceptor- Overrides:
acceptInfoin classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-
getValidatorEPackages
Returns list ofEPackages for wich this validator will be registered.- Returns:
- list of
EPackages, nevernull
-
getCheckMode
protected final org.eclipse.xtext.validation.CheckMode getCheckMode()- Overrides:
getCheckModein classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-
getCurrentObject
protected final org.eclipse.emf.ecore.EObject getCurrentObject()- Overrides:
getCurrentObjectin classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-
getCurrentMethod
- Overrides:
getCurrentMethodin classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-
getContext
- Overrides:
getContextin classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-
checkIsFromCurrentlyCheckedResource
protected void checkIsFromCurrentlyCheckedResource(org.eclipse.emf.ecore.EObject object) - Overrides:
checkIsFromCurrentlyCheckedResourcein classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-
createDiagnostic
protected final 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) - Overrides:
createDiagnosticin classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-
createDiagnostic
protected final 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) - Overrides:
createDiagnosticin classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-
error
protected void error(String message, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData) - Overrides:
errorin classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-
addIssueToState
protected void addIssueToState(String issueCode, String message, org.eclipse.emf.ecore.EStructuralFeature feature) - Overrides:
addIssueToStatein classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-
toDiagnosticSeverity
protected final int toDiagnosticSeverity(org.eclipse.xtext.diagnostics.Severity severity) - Overrides:
toDiagnosticSeverityin classorg.eclipse.xtext.validation.AbstractDeclarativeValidator
-