Пример #1
0
 internal void SubscribeTagger(MessageTagger failureTagger)
 {
     lock (m_taggers)
     {
         m_taggers.Add(failureTagger);
     }
 }
Пример #2
0
 internal void UnsubscribeTagger(MessageTagger failureTagger)
 {
     lock (m_taggers)
     {
         m_taggers.Remove(failureTagger);
     }
 }
Пример #3
0
        public ITagger <T> CreateTagger <T>(ITextView textView, ITextBuffer buffer) where T : ITag
        {
            ITagger <T> tagger = null;

            // Only attempt to spell check on the view's edit buffer (and multiple views could have that buffer open simultaneously so
            // only create one instance of the spell checker.
            if ((buffer == textView.TextBuffer) && (typeof(T) == typeof(IErrorTag)))
            {
                var filePath = GetFileNameFor(buffer);
                if (filePath != null)
                {
                    tagger = new MessageTagger(filePath, this, buffer) as ITagger <T>;
                }
            }

            return(tagger);
        }