Class LegacyCheckAdapter
java.lang.Object
com.e1c.g5.v8.dt.internal.check.legacy.LegacyCheckAdapter
- All Implemented Interfaces:
ICheck
Legacy check. This implementation of
ICheck
is used to handle mapping of the old fashioned validation
methods from xtext-based validators to the new mechanizm-
Constructor Summary
ConstructorsConstructorDescriptionLegacyCheckAdapter
(ValidationMethodDescriptor methodDescriptor, AbstractLegacyDeclarativeValidator legacyValidator, com.e1c.g5.v8.dt.internal.check.legacy.LegacyCheckAdapter.DefaultSettings defaultSettings, ILegacyValidatorProvider legacyValidatorProvider, LegacyCheckLocalizationProvider localizationProvider) Creates legacy check adapter -
Method Summary
Modifier and TypeMethodDescriptionvoid
check
(Object object, ICheckResultAcceptor resultRegistrar, ICheckParameters parameters, org.eclipse.core.runtime.IProgressMonitor progressMonitor) All checked objects must be registered in resultAcceptor.void
configureContextCollector
(ICheckDefinition definition) The first phase of the check performing is the check context prepartion.Gets the unique identifier of the check.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.e1c.g5.v8.dt.check.ICheck
check, prepareContext, prepareContext
-
Constructor Details
-
LegacyCheckAdapter
public LegacyCheckAdapter(ValidationMethodDescriptor methodDescriptor, AbstractLegacyDeclarativeValidator legacyValidator, com.e1c.g5.v8.dt.internal.check.legacy.LegacyCheckAdapter.DefaultSettings defaultSettings, ILegacyValidatorProvider legacyValidatorProvider, LegacyCheckLocalizationProvider localizationProvider) Creates legacy check adapter- Parameters:
methodDescriptor
- the validation method descriptor, cannot benull
legacyValidator
- the legacy validator instance, cannot benull
defaultSettings
- the check settings taken from validator class annotation, cannot benull
legacyValidatorProvider
- the legacy validator provider, cannot benull
localizationProvider
- the localization provider, cannot benull
-
-
Method Details
-
getCheckId
Description copied from interface:ICheck
Gets the unique identifier of the check. The identifier should be unique. The system performs automated identifier conflict resolution in case of non-unique identifiers, with addition of conflict-resolving symbols to the identifier- Specified by:
getCheckId
in interfaceICheck
- Returns:
- The identifier of the check. May not be
null
-
check
public void check(Object object, ICheckResultAcceptor resultRegistrar, ICheckParameters parameters, org.eclipse.core.runtime.IProgressMonitor progressMonitor) Description copied from interface:ICheck
All checked objects must be registered in resultAcceptor. Each checked object should be in the result, regardless of whether there are any issues in it. Adding objects that do not have errors in result is necessary to clear issues that were not previously defined in the object. Validation may be cancelled by user. Complex implemantation should take this into account and checksIProgressMonitor.isCanceled()
between long time operations. -
configureContextCollector
Description copied from interface:ICheck
The first phase of the check performing is the check context prepartion. The check should react to the system events and mark situations when the check launch is required. TheCheckDefinition
defines the logic of check context collection, see it for more details- Specified by:
configureContextCollector
in interfaceICheck
-