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; }
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); }
public IIntellisenseController TryCreateIntellisenseController(ITextView textView, IList <ITextBuffer> subjectBuffers) { return(SmartTagController.CreateInstance(this.smartTagBroker, textView, subjectBuffers)); }