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.-
Nested Class Summary
Nested classes/interfaces inherited from class com.e1c.g5.v8.dt.check.components.BasicCheck
BasicCheck.CheckConfigurer, BasicCheck.CheckParameterBuilder, BasicCheck.ContainmentConfigurationBuilder, BasicCheck.DelegateCheckConfigurationBuilder, BasicCheck.ModuleConfigurationBuilder, BasicCheck.ResultAcceptor, BasicCheck.TopObjectConfigurationBuilder, BasicCheck.TopObjectFeatureConfigurationBuilder -
Field Summary
FieldsModifier and TypeFieldDescriptionThe default types to skip propertiesprotected static final StringThe name of the parameter of the excluded feature name patternprotected static final StringThe name of the parameter of types to skip propertiesFields inherited from class com.e1c.langtool.v8.dt.bsl.validation.AbstractTranslationAmbiguityValidator
featureKeyProvider, projectManager, resourceLookup, v8ProjectManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheck(Object object, BasicCheck.ResultAcceptor resultAcceptor, ICheckParameters parameters, org.eclipse.core.runtime.IProgressMonitor monitor) The method that performs the check.collectDictionaryTranslations(ITranslatingProject project, DynamicFeatureAccess featureAccess, ICheckParameters parameters, org.eclipse.core.runtime.IProgressMonitor monitor) Collects the dictionary translations.protected booleaninternalHasMultipleTranslations(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) Methods inherited from class com.e1c.langtool.v8.dt.bsl.validation.AbstractTranslationAmbiguityValidator
checkTranslationAmbiguity, getActualEnvs, getContextDefCache, getMessageFeature, getMessageTemplate, getParameters, getReader, isDefaultLanguageChanged, isScriptVariantChanged, needValidationMethods inherited from class com.e1c.g5.v8.dt.check.components.BasicCheck
check, check, configureCheck, configureContextCollector, isCheckApplicable, postConfigureContextCollectorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.e1c.g5.v8.dt.check.ICheck
check, getCheckId, prepareContext, prepareContext
-
Field Details
-
EXCLUDE_NAME_PATTERN_PARAMETERN_NAME
The name of the parameter of the excluded feature name pattern- See Also:
-
TYPES_SKIP_PROPERTIES_PARAMETERN_NAME
The name of the parameter of types to skip properties- See Also:
-
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:BasicCheckThe 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 checkIProgressMonitor.isCanceled()periodically during long-running operations.- Overrides:
checkin classBasicCheck- Parameters:
object- The object to check, notnullresultAcceptor- Result acceptor, notnullparameters- The set of check execution parameters taken from check settings, notnullmonitor- Current check progress monitor, notnull
-
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:
internalHasMultipleTranslationsin classAbstractTranslationAmbiguityValidator
-
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 benullfeatureAccess- the dynamic feature access to get translations for, cannot benullparameters- the set of check execution parameters taken from check settings, cannot benullmonitor- the check progress monitor, cannot benull- Returns:
- the dictionary translations, never
null
-