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

public abstract class AbstractLegacyDeclarativeValidator extends AbstractModelDeclarativeValidator
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.StateAccess

    Nested 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_SEVERITIES

    Fields inherited from interface org.eclipse.emf.ecore.EValidator

    MARKER, RELATED_URIS_ATTRIBUTE, URI_ATTRIBUTE

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

    INSIGNIFICANT_INDEX
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    acceptError(String message, org.eclipse.emf.ecore.EObject object, int offset, int length, String code, String... issueData)
     
    final void
    acceptError(String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData)
     
    final void
    acceptInfo(String message, org.eclipse.emf.ecore.EObject object, int offset, int length, String code, String... issueData)
     
    final void
    acceptInfo(String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData)
     
    final void
    acceptWarning(String message, org.eclipse.emf.ecore.EObject object, int offset, int length, String code, String... issueData)
     
    final void
    acceptWarning(String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData)
     
    protected void
    addIssueToState(String issueCode, String message, org.eclipse.emf.ecore.EStructuralFeature feature)
     
    protected void
    checkIsFromCurrentlyCheckedResource(org.eclipse.emf.ecore.EObject object)
     
    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)
     
    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)
     
    protected void
    error(String message, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData)
     
    protected final org.eclipse.xtext.validation.CheckMode
     
    protected final Map<Object,Object>
     
    protected final Method
     
    protected final org.eclipse.emf.ecore.EObject
     
    final List<org.eclipse.emf.ecore.EPackage>
    Returns list of EPackages for wich this validator will be registered.
    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")
    protected final int
    toDiagnosticSeverity(org.eclipse.xtext.diagnostics.Severity severity)
     

    Methods inherited from class com._1c.g5.modeling.xtext.validation.AbstractModelDeclarativeValidator

    getCurrentLanguage, getEPackages

    Methods 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, warning

    Methods inherited from class org.eclipse.xtext.validation.AbstractInjectableValidator

    isLanguageSpecific, isResponsible, register, validate, validate, validate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 be null
      object - the target object being validated, cannot be null
      context - the validation context, cannot be null
      diagnosticConsumer - the diagnostic consumer used to issues creation, cannot be null
    • 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:
      acceptError in interface org.eclipse.xtext.validation.ValidationMessageAcceptor
      Overrides:
      acceptError in class org.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:
      acceptWarning in interface org.eclipse.xtext.validation.ValidationMessageAcceptor
      Overrides:
      acceptWarning in class org.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:
      acceptInfo in interface org.eclipse.xtext.validation.ValidationMessageAcceptor
      Overrides:
      acceptInfo in class org.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:
      acceptError in interface org.eclipse.xtext.validation.ValidationMessageAcceptor
      Overrides:
      acceptError in class org.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:
      acceptWarning in interface org.eclipse.xtext.validation.ValidationMessageAcceptor
      Overrides:
      acceptWarning in class org.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:
      acceptInfo in interface org.eclipse.xtext.validation.ValidationMessageAcceptor
      Overrides:
      acceptInfo in class org.eclipse.xtext.validation.AbstractDeclarativeValidator
    • getValidatorEPackages

      public final List<org.eclipse.emf.ecore.EPackage> getValidatorEPackages()
      Returns list of EPackages for wich this validator will be registered.
      Returns:
      list of EPackages, never null
    • getCheckMode

      protected final org.eclipse.xtext.validation.CheckMode getCheckMode()
      Overrides:
      getCheckMode in class org.eclipse.xtext.validation.AbstractDeclarativeValidator
    • getCurrentObject

      protected final org.eclipse.emf.ecore.EObject getCurrentObject()
      Overrides:
      getCurrentObject in class org.eclipse.xtext.validation.AbstractDeclarativeValidator
    • getCurrentMethod

      protected final Method getCurrentMethod()
      Overrides:
      getCurrentMethod in class org.eclipse.xtext.validation.AbstractDeclarativeValidator
    • getContext

      protected final Map<Object,Object> getContext()
      Overrides:
      getContext in class org.eclipse.xtext.validation.AbstractDeclarativeValidator
    • checkIsFromCurrentlyCheckedResource

      protected void checkIsFromCurrentlyCheckedResource(org.eclipse.emf.ecore.EObject object)
      Overrides:
      checkIsFromCurrentlyCheckedResource in class org.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:
      createDiagnostic in class org.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:
      createDiagnostic in class org.eclipse.xtext.validation.AbstractDeclarativeValidator
    • error

      protected void error(String message, org.eclipse.emf.ecore.EStructuralFeature feature, int index, String code, String... issueData)
      Overrides:
      error in class org.eclipse.xtext.validation.AbstractDeclarativeValidator
    • addIssueToState

      protected void addIssueToState(String issueCode, String message, org.eclipse.emf.ecore.EStructuralFeature feature)
      Overrides:
      addIssueToState in class org.eclipse.xtext.validation.AbstractDeclarativeValidator
    • toDiagnosticSeverity

      protected final int toDiagnosticSeverity(org.eclipse.xtext.diagnostics.Severity severity)
      Overrides:
      toDiagnosticSeverity in class org.eclipse.xtext.validation.AbstractDeclarativeValidator