public SemanticTagger(HlslClassificationService classificationService, BackgroundParser backgroundParser) { _classificationService = classificationService; backgroundParser.SubscribeToThrottledSemanticModelAvailable(BackgroundParserSubscriptionDelay.Short, async x => await InvalidateTags(x.Snapshot, x.CancellationToken)); }
public SemanticErrorTagger(ITextView textView, BackgroundParser backgroundParser, IOptionsService optionsService) : base(PredefinedErrorTypeNames.CompilerError, textView, optionsService) { backgroundParser.SubscribeToThrottledSemanticModelAvailable(BackgroundParserSubscriptionDelay.Medium, async x => await InvalidateTags(x.Snapshot, x.CancellationToken)); }
public SemanticErrorManager(BackgroundParser backgroundParser, ITextView textView, IHlslOptionsService optionsService, IServiceProvider serviceProvider, ITextDocumentFactoryService textDocumentFactoryService) : base(textView, optionsService, serviceProvider, textDocumentFactoryService) { backgroundParser.SubscribeToThrottledSemanticModelAvailable(BackgroundParserSubscriptionDelay.OnIdle, async x => await ExceptionHelper.TryCatchCancellation(() => { RefreshErrors(x.Snapshot, x.CancellationToken); return(Task.FromResult(0)); })); }
public HighlightingTagger(BackgroundParser backgroundParser, ITextView textView, ImmutableArray <IHighlighter> highlighters, IServiceProvider serviceProvider) { backgroundParser.SubscribeToThrottledSemanticModelAvailable(BackgroundParserSubscriptionDelay.OnIdle, async x => await InvalidateTags(x.Snapshot, x.CancellationToken)); textView.Caret.PositionChanged += OnCaretPositionChanged; _textView = textView; _highlighters = highlighters; var dte = serviceProvider.GetService <SDTE, DTE>(); _vsVersion = VisualStudioVersionUtility.FromDteVersion(dte.Version); }