public SytaxWalkerForOutlining(ITextSnapshot snapshot, IdeServices ideServices,
                                CancellationToken cancellationToken)
 {
     _textSnapshot      = snapshot;
     _ideServices       = ideServices;
     _cancellationToken = cancellationToken;
 }
예제 #2
0
 public OutliningTaggerProvider(
     ITextEditorFactoryService textEditorFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IProjectionBufferFactoryService projectionBufferFactoryService)
 {
     _ideServices = new IdeServices(textEditorFactoryService,
                                    editorOptionsFactoryService, projectionBufferFactoryService, Dispatcher.CurrentDispatcher);
 }
예제 #3
0
        public static FrameworkElement GetHint(SnapshotSpan span, IdeServices ideServices)
        {
            var x = new ElisionBufferDeferredContent(span,
                                                     ideServices.ProjectionBufferFactoryService,
                                                     ideServices.EditorOptionsFactoryService,
                                                     ideServices.TextEditorFactoryService);

            return(ideServices.UiDispatcher.Invoke(() => x.Create()));
        }
예제 #4
0
        public OutliningTagger(ITextBuffer buffer,
                               IdeServices ideServices)
        {
            _buffer          = buffer;
            _ideServices     = ideServices;
            _buffer.Changed += BufferChanged;

            _updateTimer = new DispatcherTimer(DispatcherPriority.ApplicationIdle)
            {
                Interval = TimeSpan.FromMilliseconds(2500)
            };
            _updateTimer.Tick += (sender, args) =>
            {
                _updateTimer.Stop();
                RunOutlineAsync();
            };
            _updateTimer.Start();
        }