Example #1
0
        public void ConnectSubjectBuffer(ITextBuffer subjectBuffer)
        {
            PropagateAnalyzer(subjectBuffer);

            Debug.Assert(_bufferParser != null, "SetBufferParser has not been called");
            BufferParser existingParser;

            if (!subjectBuffer.Properties.TryGetProperty(typeof(BufferParser), out existingParser))
            {
                _bufferParser.AddBuffer(subjectBuffer);
            }
            else
            {
                // already connected to a buffer parser, we should have the same project entry
                Debug.Assert(_bufferParser._currentProjEntry == existingParser._currentProjEntry);
            }
        }
Example #2
0
 public void ConnectSubjectBuffer(ITextBuffer subjectBuffer)
 {
     _bufferParser.AddBuffer(subjectBuffer);
     _subjectBuffers.Add(subjectBuffer);
 }