Пример #1
0
        static internal SmartTagController CreateInstance(ISmartTagBroker broker, ITextView textView, IList<ITextBuffer> subjectBuffers) {
            Type key = typeof(SmartTagController);

            SmartTagController controller = null;
            if (textView.Properties.TryGetProperty(key, out controller)) {
                return controller;
            }

            controller = new SmartTagController(broker, textView);
            textView.Properties.AddProperty(key, controller);

            foreach (var buffer in subjectBuffers) {
                buffer.ChangedLowPriority += controller.SubjectBufferChangedLowPriority;
            }

            return controller;
        }
Пример #2
0
        static internal SmartTagController CreateInstance(ISmartTagBroker broker, ITextView textView, IList <ITextBuffer> subjectBuffers)
        {
            Type key = typeof(SmartTagController);

            SmartTagController controller = null;

            if (textView.Properties.TryGetProperty(key, out controller))
            {
                return(controller);
            }

            controller = new SmartTagController(broker, textView);
            textView.Properties.AddProperty(key, controller);

            foreach (var buffer in subjectBuffers)
            {
                buffer.ChangedLowPriority += controller.SubjectBufferChangedLowPriority;
            }

            return(controller);
        }
Пример #3
0
 public IIntellisenseController TryCreateIntellisenseController(ITextView textView,
                                                                IList <ITextBuffer> subjectBuffers)
 {
     return(SmartTagController.CreateInstance(this.smartTagBroker, textView, subjectBuffers));
 }