示例#1
0
 private void QueueTreeForValidation()
 {
     // Transfer available errors from the tree right away
     foreach (ParseError e in _editorTree.AstRoot.Errors)
     {
         ValidationResults.Enqueue(new ValidationError(e, ErrorText.GetText(e.ErrorType), e.Location));
     }
 }
示例#2
0
 private void StartValidation()
 {
     if (_syntaxCheckEnabled && _editorTree != null)
     {
         // Transfer available errors from the tree right away
         foreach (var e in _editorTree.AstRoot.Errors)
         {
             ValidationResults.Enqueue(new ValidationError(e, ErrorText.GetText(e.ErrorType), e.Location));
         }
         // Run all validators
         _cts = new CancellationTokenSource();
         _aggregator.RunAsync(_editorTree.AstRoot, ValidationResults, _cts.Token).DoNotWait();
     }
 }
示例#3
0
 private void StartValidation()
 {
     if (_syntaxCheckEnabled && _editorTree != null)
     {
         // Transfer available errors from the tree right away
         foreach (var e in _editorTree.AstRoot.Errors)
         {
             ValidationResults.Enqueue(new ValidationError(e, ErrorText.GetText(e.ErrorType), e.Location, _editorTree.AstRoot.Root.TextProvider.Version));
         }
         // Run all validators
         _cts = new CancellationTokenSource();
         var projected = IsProjectedBuffer(_editorTree.EditorBuffer);
         _aggregator.RunAsync(_editorTree.AstRoot, projected, _settings.LintOptions.Enabled, ValidationResults, _cts.Token).DoNotWait();
     }
 }