Example #1
0
            private void OnTagsChangedForBuffer(ICollection <KeyValuePair <ITextBuffer, DiffResult> > changes)
            {
                _tagSource.AssertIsForeground();

                // Note: This operation is uncancellable. Once we've been notified here, our cached tags
                // in the tag source are new. If we don't update the UI of the editor then we will end
                // up in an inconsistent state between us and the editor where we have new tags but the
                // editor will never know.

                foreach (var change in changes)
                {
                    if (change.Key != _subjectBuffer)
                    {
                        continue;
                    }

                    // Now report them back to the UI on the main thread.

                    // We ask to update UI immediately for removed tags
                    NotifyEditors(change.Value.Removed, _tagSource.RemovedTagNotificationDelay);
                    NotifyEditors(change.Value.Added, _tagSource.AddedTagNotificationDelay);
                }
            }
Example #2
0
            private void OnTagsChangedForBuffer(ICollection <KeyValuePair <ITextBuffer, NormalizedSnapshotSpanCollection> > changes)
            {
                _tagSource.AssertIsForeground();

                // Note: This operation is uncancellable. Once we've been notified here, our cached tags
                // in the tag source are new. If we don't update the UI of the editor then we will end
                // up in an inconsistent state between us and the editor where we have new tags but the
                // editor will never know.

                foreach (var change in changes)
                {
                    if (change.Key != _subjectBuffer)
                    {
                        continue;
                    }

                    // Now report them back to the UI on the main thread.
                    _batchChangeNotifier.EnqueueChanges(change.Value);
                }
            }