コード例 #1
0
        public IQuickInfoSource TryCreateQuickInfoSource(ITextBuffer textBuffer)
        {
            ITextDocument textDocument;

            textBuffer.Properties.TryGetProperty(typeof(ITextDocument), out textDocument);

            Func <IQuickInfoSource> sc = delegate { return(RuntimeLoader.GetObject <IQuickInfoSource>(textDocument.FilePath, t => t.Name == "QuickInfoSource", serviceProvider, textBuffer)); };

            return(textBuffer.Properties.GetOrCreateSingletonProperty(sc));
        }
コード例 #2
0
        public ITagger <T> CreateTagger <T>(ITextBuffer buffer) where T : ITag
        {
            ITextDocument textDocument;

            buffer.Properties.TryGetProperty(typeof(ITextDocument), out textDocument);

            Func <ITagger <T> > sc = delegate { return(RuntimeLoader.GetObject <ITagger <T> >(textDocument.FilePath, t => t.Name == "IntraTextAdornmentTagger", _serviceProvider, buffer)); };

            return(buffer.Properties.GetOrCreateSingletonProperty(sc));
        }
コード例 #3
0
        public IIntellisenseController TryCreateIntellisenseController(ITextView textView, IList <ITextBuffer> subjectBuffers)
        {
            ITextDocument textDocument;

            textView.TextBuffer.Properties.TryGetProperty(typeof(ITextDocument), out textDocument);

            Func <IIntellisenseController> sc = delegate { return(RuntimeLoader.GetObject <IIntellisenseController>(textDocument.FilePath, t => t.Name == "IntellisenseController", _serviceProvider, textView, subjectBuffers)); };

            return(textView.Properties.GetOrCreateSingletonProperty(sc));
        }
コード例 #4
0
        public IMouseProcessor GetAssociatedProcessor(IWpfTextView wpfTextView)
        {
            ITextDocument textDocument;

            wpfTextView.TextBuffer.Properties.TryGetProperty(typeof(ITextDocument), out textDocument);

            Func <IMouseProcessor> sc = delegate { return(RuntimeLoader.GetObject <IMouseProcessor>(textDocument.FilePath, t => t.Name == "MouseProcessor", serviceProvider, wpfTextView)); };

            return(wpfTextView.Properties.GetOrCreateSingletonProperty(sc));
        }
コード例 #5
0
        public void TextViewCreated(IWpfTextView textView)
        {
            ITextDocument textDocument;

            textView.TextBuffer.Properties.TryGetProperty(typeof(ITextDocument), out textDocument);

            Func <object> sc = delegate { return(RuntimeLoader.GetObject <object>(textDocument.FilePath, t => t.Name == "WpfTextViewHandler", serviceProvider, textView)); };

            textView.Properties.GetOrCreateSingletonProperty(sc);
        }