Ejemplo n.º 1
0
        public void Activate()
        {
            foreach (ITextBuffer buffer in this.textView.BufferGraph.GetTextBuffers((b) => true))
            {
                BufferBar bar = new BufferBar(buffer, this.textViewHost, this.editorOperations, this.editorFactory);
                this.barMap.Add(buffer, bar);
            }
            AddChildren();

            this.textView.BufferGraph.GraphBuffersChanged += OnGraphBuffersChanged;
        }
Ejemplo n.º 2
0
 private void OnGraphBuffersChanged(object sender, GraphBuffersChangedEventArgs e)
 {
     foreach (ITextBuffer removedBuffer in e.RemovedBuffers)
     {
         BufferBar bar = this.barMap[removedBuffer];
         this.barMap.Remove(removedBuffer);
         bar.Close();
     }
     foreach (ITextBuffer addedBuffer in e.AddedBuffers)
     {
         BufferBar bar = new BufferBar(addedBuffer, this.textViewHost, this.editorOperations, this.editorFactory);
         this.barMap.Add(addedBuffer, bar);
     }
     Children.Clear();
     AddChildren();
 }