public SyntaxTagger(ShaderLabClassificationService classificationService, BackgroundParser backgroundParser) { _classificationService = classificationService; backgroundParser.SubscribeToThrottledSyntaxTreeAvailable(BackgroundParserSubscriptionDelay.NearImmediate, async x => await InvalidateTags(x.Snapshot, x.CancellationToken)); }
public SyntaxErrorTagger(ITextView textView, ITextBuffer textBuffer, BackgroundParser backgroundParser, IHlslOptionsService optionsService) : base(PredefinedErrorTypeNames.SyntaxError, textView, textBuffer, optionsService) { backgroundParser.SubscribeToThrottledSyntaxTreeAvailable(BackgroundParserSubscriptionDelay.Medium, async x => await InvalidateTags(x.Snapshot, x.CancellationToken)); }
public OutliningTagger(ITextBuffer textBuffer, BackgroundParser backgroundParser, IOptionsService optionsService) { _textBuffer = textBuffer; backgroundParser.SubscribeToThrottledSyntaxTreeAvailable(BackgroundParserSubscriptionDelay.OnIdle, async x => await InvalidateTags(x.Snapshot, x.CancellationToken)); _enabled = optionsService.AdvancedOptions.EnterOutliningModeWhenFilesOpen; }
public SyntaxErrorManager(BackgroundParser backgroundParser, ITextView textView, IShaderLabOptionsService optionsService, IServiceProvider serviceProvider, ITextDocumentFactoryService textDocumentFactoryService) : base(textView, optionsService, serviceProvider, textDocumentFactoryService) { backgroundParser.SubscribeToThrottledSyntaxTreeAvailable(BackgroundParserSubscriptionDelay.OnIdle, async x => await ExceptionHelper.TryCatchCancellation(() => { RefreshErrors(x.Snapshot, x.CancellationToken); return(Task.FromResult(0)); })); }
public BraceMatchingTagger(BackgroundParser backgroundParser, ITextView textView, BraceMatcher braceMatcher) { backgroundParser.SubscribeToThrottledSyntaxTreeAvailable(BackgroundParserSubscriptionDelay.NearImmediate, async x => await InvalidateTags(x.Snapshot, x.CancellationToken)); textView.Caret.PositionChanged += OnCaretPositionChanged; _textView = textView; _braceMatcher = braceMatcher; }
public EditorNavigationSource(ITextBuffer textBuffer, BackgroundParser backgroundParser, DispatcherGlyphService glyphService) { _textBuffer = textBuffer; _glyphService = glyphService; _navigationTargets = new List <EditorTypeNavigationTarget>(); backgroundParser.SubscribeToThrottledSyntaxTreeAvailable(BackgroundParserSubscriptionDelay.Medium, async x => await ExceptionHelper.TryCatchCancellation(async() => await InvalidateTargets(x.Snapshot, x.CancellationToken))); }