Class BasicCheck<CT>
java.lang.Object
com.e1c.g5.v8.dt.check.components.BasicCheck<CT>
- All Implemented Interfaces:
ITopObjectFilter
,ICheck<CT>
- Direct Known Subclasses:
AdditionalIndexesCheck
,BaseQlDelegatingCheck
,BinaryDataStorageLocationUseFieldTypeCheck
,BslQlDelegatingCheck
,ConfigurationStandaloneContentCheck
,DbObjectTabularSectionCheck
,DocumentationCommentBasicDelegateCheck
,DocumentationCommentDelegatingCheck
,QlBasicDelegateCheck
,ReferenceValueCheck
,ReferenceValueCheckNonCritical
,XdtoPackageExtensionPackageNamespaceFeaturesStateCheck
Standard implementation of check with wide capabilities of configuring.
Provides simplified scheme for the definition of a check lifecycle based on
the tracking of the feature changes of the target object
See the
BasicCheck.CheckConfigurer
for the details of the configuration process-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
The root object of the simplified check configuration based on the EMF model structure definition.static final class
Check parameter builder.static final class
Containment configuration builder.static final class
Delegated computation configuration builder.static final class
Module configuration builder.static final class
Accepts results of the check in form ofIssue
's.static final class
Top object configuration builder.static final class
Builder that supports building of the top object feature tracking rules configuration. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
check
(Object object, BasicCheck.ResultAcceptor resultAcceptor, ICheckParameters parameters, CT context, org.eclipse.core.runtime.IProgressMonitor progressMonitor) The method that performs the check.protected void
check
(Object object, BasicCheck.ResultAcceptor resultAcceptor, ICheckParameters parameters, org.eclipse.core.runtime.IProgressMonitor progressMonitor) The method that performs the check.final void
check
(Object object, ICheckResultAcceptor resultRegistrar, ICheckParameters parameters, CT checkContext, org.eclipse.core.runtime.IProgressMonitor progressMonitor) All checked objects must be registered in resultAcceptor.protected abstract void
configureCheck
(BasicCheck.CheckConfigurer configurationBuilder) The check is performed in case of changes of the tracjed object model/language module changes.final void
configureContextCollector
(ICheckDefinition definition) The first phase of the check performing is the check context prepartion.boolean
isCheckApplicable
(IBmObject topObject, ICheckParameters parameters) Checks if the given top object is a potential target of the current check.protected void
postConfigureContextCollector
(ICheckDefinition definition) Performs low-level post-configuration phase forBasicCheck
descendantsMethods 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, getCheckId, prepareContext, prepareContext
-
Constructor Details
-
BasicCheck
public BasicCheck()Constructs an instance of the check
-
-
Method Details
-
check
public final void check(Object object, ICheckResultAcceptor resultRegistrar, ICheckParameters parameters, CT checkContext, 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.- Specified by:
check
in interfaceICheck<CT>
- Parameters:
object
- the checking object, notnull
resultRegistrar
- the result acceptor, notnull
parameters
- check execution parameters from settings, notnull
checkContext
- the context of a check (if provided). May benull
progressMonitor
- progress monitor, notnull
-
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<CT>
-
isCheckApplicable
Description copied from interface:ITopObjectFilter
Checks if the given top object is a potential target of the current check. This method is being called by the check engine during the validation cycle, effectively preventing the check from execution in case of false decision- Specified by:
isCheckApplicable
in interfaceITopObjectFilter
- Parameters:
topObject
- The top object to check. May not benull
parameters
- The set of the check parameter. May not benull
- Returns:
- True if the top object is potential target for the check. False overwise.
-
check
protected void check(Object object, BasicCheck.ResultAcceptor resultAcceptor, ICheckParameters parameters, org.eclipse.core.runtime.IProgressMonitor progressMonitor) 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 checkIProgressMonitor.isCanceled()
periodically during long-running operations.- Parameters:
object
- The object to check, notnull
resultAcceptor
- Result acceptor, notnull
parameters
- The set of check execution parameters taken from check settings, notnull
progressMonitor
- Current check progress monitor, notnull
-
postConfigureContextCollector
Performs low-level post-configuration phase forBasicCheck
descendants- Parameters:
definition
- The target definition of the check. Cannot benull
-
check
protected void check(Object object, BasicCheck.ResultAcceptor resultAcceptor, ICheckParameters parameters, CT context, org.eclipse.core.runtime.IProgressMonitor progressMonitor) 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 checkIProgressMonitor.isCanceled()
periodically during long-running operations.- Parameters:
object
- The object to check, notnull
resultAcceptor
- Result acceptor, notnull
parameters
- The set of check execution parameters taken from check settings, notnull
context
- Additional context of the check, may benull
progressMonitor
- Current check progress monitor, notnull
-
configureCheck
The check is performed in case of changes of the tracjed object model/language module changes. In order to define the rules of the check performing, the developer should define the set ofEClass
'es and their features those changes are being tracked/or be targets of the validation- Parameters:
checkConfigurer
- The check configuration builder. May not benull
-