コード例 #1
0
 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));
 }
コード例 #2
0
        public EditorNavigationSource(ITextBuffer textBuffer, BackgroundParser backgroundParser, DispatcherGlyphService glyphService)
        {
            _textBuffer = textBuffer;
            _glyphService = glyphService;

            _navigationTargets = new List<EditorTypeNavigationTarget>();

            backgroundParser.RegisterSyntaxTreeHandler(BackgroundParserHandlerPriority.Medium, this);
        }
コード例 #3
0
 public SyntaxErrorManager(BackgroundParser backgroundParser, ITextView textView, IOptionsService 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);
         }));
 }
コード例 #4
0
        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)));
        }
コード例 #5
0
        public SyntaxErrorTagger(ITextView textView, BackgroundParser backgroundParser, IErrorListHelper errorListHelper, IOptionsService optionsService)
            : base(PredefinedErrorTypeNames.SyntaxError, errorListHelper)
        {
            optionsService.OptionsChanged += OnOptionsChanged;
            textView.Closed += (sender, e) => optionsService.OptionsChanged -= OnOptionsChanged;

            _errorListHelper = errorListHelper;
            _optionsService = optionsService;
            backgroundParser.RegisterSyntaxTreeHandler(BackgroundParserHandlerPriority.Low, this);

            OnOptionsChanged(this, EventArgs.Empty);
        }