Class AbstractDynamicFeatureAccessTranslationAmbiguityValidator

java.lang.Object
com.e1c.g5.v8.dt.check.components.BasicCheck
com.e1c.langtool.v8.dt.bsl.validation.AbstractTranslationAmbiguityValidator
com.e1c.langtool.v8.dt.bsl.validation.AbstractDynamicFeatureAccessTranslationAmbiguityValidator
All Implemented Interfaces:
ITopObjectFilter, ICheck
Direct Known Subclasses:
DynamicFeatureAccessTranslationAmbiguityValidator, PrunedDynamicFeatureAccessTranslationAmbiguityValidator

public abstract class AbstractDynamicFeatureAccessTranslationAmbiguityValidator extends AbstractTranslationAmbiguityValidator
Base ambiguous translation detecting validator. This validator check DynamicFeatureAccess for possible translations and report those one which has more than one translation available.
  • Field Details

    • EXCLUDE_NAME_PATTERN_PARAMETERN_NAME

      protected static final String EXCLUDE_NAME_PATTERN_PARAMETERN_NAME
      The name of the parameter of the excluded feature name pattern
      See Also:
    • TYPES_SKIP_PROPERTIES_PARAMETERN_NAME

      protected static final String TYPES_SKIP_PROPERTIES_PARAMETERN_NAME
      The name of the parameter of types to skip properties
      See Also:
    • DEFAULT_TYPES_SKIP_PROPERTIES

      protected static final Set<String> DEFAULT_TYPES_SKIP_PROPERTIES
      The default types to skip properties
  • Constructor Details

    • AbstractDynamicFeatureAccessTranslationAmbiguityValidator

      public AbstractDynamicFeatureAccessTranslationAmbiguityValidator()
  • Method Details

    • check

      protected void check(Object object, BasicCheck.ResultAcceptor resultAcceptor, ICheckParameters parameters, org.eclipse.core.runtime.IProgressMonitor monitor)
      Description copied from class: BasicCheck
      The method that performs the check. Check results (issues) need to be placed into the result acceptor. Validation may be cancelled by a user. Complex implemantations should take this into the account and check IProgressMonitor.isCanceled() periodically during long-running operations.
      Overrides:
      check in class BasicCheck
      Parameters:
      object - The object to check, not null
      resultAcceptor - Result acceptor, not null
      parameters - The set of check execution parameters taken from check settings, not null
      monitor - Current check progress monitor, not null
    • internalHasMultipleTranslations

      protected boolean internalHasMultipleTranslations(org.eclipse.emf.ecore.EObject object, BasicCheck.ResultAcceptor resultAcceptor, ICheckParameters parameters, org.eclipse.core.runtime.IProgressMonitor monitor, Map<String,Set<String>> translations, ITranslatingProject translatingProject, boolean isEnglishScript, Environmental environmental, Environments environments)
      Specified by:
      internalHasMultipleTranslations in class AbstractTranslationAmbiguityValidator
    • collectDictionaryTranslations

      protected Set<String> collectDictionaryTranslations(ITranslatingProject project, DynamicFeatureAccess featureAccess, ICheckParameters parameters, org.eclipse.core.runtime.IProgressMonitor monitor)
      Collects the dictionary translations.
      Parameters:
      project - the translating project, cannot be null
      featureAccess - the dynamic feature access to get translations for, cannot be null
      parameters - the set of check execution parameters taken from check settings, cannot be null
      monitor - the check progress monitor, cannot be null
      Returns:
      the dictionary translations, never null