Class CheckScheduler

java.lang.Object
com.e1c.g5.v8.dt.internal.check.CheckScheduler
All Implemented Interfaces:
IManagedService, ICheckScheduler, ICheckSettingsChangeListener

@LifecycleService(name="CHECK_SCHEDULER") public class CheckScheduler extends Object implements ICheckScheduler, ICheckSettingsChangeListener
Check scheduler implementation. Performs direct schedules as well as reactive (in case of resource changes, etc)
  • Constructor Details

  • Method Details

    • activate

      public void activate()
      Specified by:
      activate in interface IManagedService
    • deactivate

      public void deactivate()
      Specified by:
      deactivate in interface IManagedService
    • disposeResourceListener

      @LifecycleParticipant(phase=STORAGE_CLOSING, dependsOn="BM_MODEL_MANAGER") public void disposeResourceListener(ProjectContext projectContext)
    • init

      @LifecycleParticipant(phase=LINKING, dependsOn="CHECK_REPOSITORY") public void init()
    • onChange

      public void onChange(org.eclipse.core.resources.IProject project, Collection<CheckSettingsChange> changedCheckSettings)
      Description copied from interface: ICheckSettingsChangeListener
      This method is called on check settings getDiffWithInstanceSettings.
      Specified by:
      onChange in interface ICheckSettingsChangeListener
      Parameters:
      project - project with specific settings or null for instance settings.
      changedCheckSettings - the collection of changed settings, not null
    • onStorageInitialization

      @LifecycleParticipant(phase=STORAGE_INITIALIZATION, dependsOn="DerivedDataManager") public void onStorageInitialization(ProjectContext projectContext)
      Checks if there are some language resources are being scheduled during the period of project context unreadiness and schedules the computation if necessary.
      Parameters:
      projectContext - The project context. May not be null
    • onPostResourceLoading

      @LifecycleParticipant(phase=POST_RESOURCE_LOADING, dependsOn={"BM_MODEL_MANAGER","MARKER_MANAGER_V2"}) public void onPostResourceLoading(ProjectContext projectContext)
      Marks that initial resource loading for the project was completed.

      Also processes a potential crash from IMarkerManagerV2 and schedules recheck of the affected objects.

      Parameters:
      projectContext - The project context. May not be null
    • scheduleClearance

      public void scheduleClearance(org.eclipse.core.resources.IProject project, Set<String> checkIds, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
      Description copied from interface: ICheckScheduler
      Schedules the clearance of the check results for the given set of checks
      Specified by:
      scheduleClearance in interface ICheckScheduler
      Parameters:
      project - Target project, not null
      checkIds - The set of target check identifeirs. If empty set is applied - all applicable checks will be cleared, not null
      progressMonitor - progress monitor, not null
    • scheduleValidation

      public void scheduleValidation(org.eclipse.core.resources.IProject project, Set<String> checkIds, Collection<Object> topObjectIds, boolean isRecursive, IBmTransaction transaction, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
      Description copied from interface: ICheckScheduler
      Schedules the model object validation for objects with given object ids by suitable checks with the given check ids. It will probably be executed asynchronously. It can be canceled using the progress monitor.
      Specified by:
      scheduleValidation in interface ICheckScheduler
      Parameters:
      project - Target project, not null
      checkIds - The set of target check identifeirs. If empty set is applied - all applicable checks will be scheduled, not null
      topObjectIds - Identifiers of checked objects, all available objects if left empty, not null
      isRecursive - if true all the dependencies (including modules) of objects provided by topObjectIds are processed. If false then it's supposed that all required objects are passed via topObjectIds
      transaction - The active read-only transaction to perform the scheduling of checks (e.g. context collection)
      progressMonitor - progress monitor, not null
    • scheduleValidation

      public void scheduleValidation(org.eclipse.core.resources.IProject project, Set<String> checkIds, Collection<Object> topObjectIds, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
      Description copied from interface: ICheckScheduler
      Schedules the model object validation for objects with given object ids by suitable checks with the given check ids. It will probably be executed asynchronously. It can be canceled using the progress monitor.
      Specified by:
      scheduleValidation in interface ICheckScheduler
      Parameters:
      project - Target project, not null
      checkIds - The set of target check identifeirs. If empty set is applied - all applicable checks will be scheduled, not null
      topObjectIds - Identifiers of checked objects, all available objects if left empty, not null
      progressMonitor - progress monitor, not null
    • unlinking

      @LifecycleParticipant(phase=UNLINKING, dependsOn="CHECK_REPOSITORY") public void unlinking()
    • permitDeactivatedCheckRequest

      public void permitDeactivatedCheckRequest(Object objectId, org.eclipse.core.resources.IProject project)
      Description copied from interface: ICheckScheduler
      Permits next request to check for a specific object even if massive checks are deactivated for a specified project. This method allows active editors to perform limited number of checks independenly of the mode
      Specified by:
      permitDeactivatedCheckRequest in interface ICheckScheduler
      Parameters:
      objectId - Target object identifier. Accepts both resource URI's and BM object ids
      project - Target project, not null
    • isDeactivatedCheckPermitted

      public boolean isDeactivatedCheckPermitted(Object objectId, org.eclipse.core.resources.IProject project)
      Description copied from interface: ICheckScheduler
      States if there is an explicit permission was given earlier to perform checks for a provided object. The permission is retracted after a check so it is a single-time permission effectively
      Specified by:
      isDeactivatedCheckPermitted in interface ICheckScheduler
      Parameters:
      objectId - The object to check permission for. Cannot be null. Must be compliant with ICheckScheduler#permitDeactivatedCheckRequest(IProject, Object) requirements
      project - Target project, not null
      Returns:
      True if a permission was given earlier