Class BslXtextDocumentProvider.BslValidationJob

  • All Implemented Interfaces:
    Comparable, org.eclipse.core.runtime.IAdaptable
    Enclosing class:
    BslXtextDocumentProvider

    public static class BslXtextDocumentProvider.BslValidationJob
    extends org.eclipse.xtext.ui.editor.validation.ValidationJob
    Custom ValidationJob for Bsl language. Provides logic for partial update of validation issues in case of partial reparse. Also has methods for skip validation.
    • Field Summary

      • Fields inherited from class org.eclipse.xtext.ui.editor.validation.ValidationJob

        DEFAULT_VALIDATION_CONTEXT, XTEXT_VALIDATION_FAMILY
      • Fields inherited from class org.eclipse.core.runtime.jobs.Job

        ASYNC_FINISH, BUILD, DECORATE, INTERACTIVE, LONG, NONE, RUNNING, SHORT, SLEEPING, WAITING
      • Fields inherited from class org.eclipse.core.internal.jobs.InternalJob

        manager
    • Constructor Summary

      Constructors 
      Constructor Description
      BslValidationJob​(org.eclipse.xtext.validation.IResourceValidator xtextResourceChecker, org.eclipse.xtext.util.concurrent.IReadAccess<org.eclipse.xtext.resource.XtextResource> xtextDocument, org.eclipse.xtext.ui.editor.validation.IValidationIssueProcessor validationIssueProcessor, org.eclipse.xtext.validation.CheckMode checkMode, org.eclipse.jface.text.source.IAnnotationModel annotationModel)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      List<org.eclipse.xtext.validation.Issue> createIssues​(org.eclipse.core.runtime.IProgressMonitor monitor)  
      boolean isSkip()
      Checks that skip validation job is needed
      void skip​(boolean skip)
      Skips validation.
      • Methods inherited from class org.eclipse.xtext.ui.editor.validation.ValidationJob

        belongsTo, getCheckMode, getResourceValidator, getXtextDocument, run
      • Methods inherited from class org.eclipse.core.runtime.jobs.Job

        addJobChangeListener, cancel, canceling, create, create, createSystem, createSystem, createSystem, done, getJobGroup, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, join, removeJobChangeListener, schedule, schedule, setJobGroup, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, shouldRun, shouldSchedule, sleep, toString, wakeUp, wakeUp, yieldRule
      • Methods inherited from class org.eclipse.core.internal.jobs.InternalJob

        compareTo
      • Methods inherited from class org.eclipse.core.runtime.PlatformObject

        getAdapter
    • Constructor Detail

      • BslValidationJob

        public BslValidationJob​(org.eclipse.xtext.validation.IResourceValidator xtextResourceChecker,
                                org.eclipse.xtext.util.concurrent.IReadAccess<org.eclipse.xtext.resource.XtextResource> xtextDocument,
                                org.eclipse.xtext.ui.editor.validation.IValidationIssueProcessor validationIssueProcessor,
                                org.eclipse.xtext.validation.CheckMode checkMode,
                                org.eclipse.jface.text.source.IAnnotationModel annotationModel)
        Constructor
        Parameters:
        xtextResourceChecker - actual IResourceValidator, cannot be null
        xtextDocument - actual IReadAccess for XtextResource, cannot be null
        validationIssueProcessor - actual IValidationIssueProcessor, cannot be null
        checkMode - CheckMode for validation, cannot be null
        annotationModel - IAnnotationModel for create annnotation for new validation issue, cannot be null
    • Method Detail

      • skip

        public void skip​(boolean skip)
        Skips validation.
        Parameters:
        skip - if true job will be canceled and there is no validation until skip == true. if true createIssues(IProgressMonitor) returns old validation issue.
      • isSkip

        public boolean isSkip()
        Checks that skip validation job is needed
        Returns:
        true if skip validation job is needed, false otherwise
      • createIssues

        public List<org.eclipse.xtext.validation.Issue> createIssues​(org.eclipse.core.runtime.IProgressMonitor monitor)
        Overrides:
        createIssues in class org.eclipse.xtext.ui.editor.validation.ValidationJob