当前位置: 首页>>代码示例>>C#>>正文


C# ITextView.GetAnalyzer方法代码示例

本文整理汇总了C#中ITextView.GetAnalyzer方法的典型用法代码示例。如果您正苦于以下问题:C# ITextView.GetAnalyzer方法的具体用法?C# ITextView.GetAnalyzer怎么用?C# ITextView.GetAnalyzer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ITextView的用法示例。


在下文中一共展示了ITextView.GetAnalyzer方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TryCreateIntellisenseController

        public IIntellisenseController TryCreateIntellisenseController(ITextView textView, IList<ITextBuffer> subjectBuffers) {
            IntellisenseController controller;
            if (!textView.Properties.TryGetProperty<IntellisenseController>(typeof(IntellisenseController), out controller)) {
                controller = new IntellisenseController(this, textView, _ServiceProvider);
            }

            var analyzer = textView.GetAnalyzer(_ServiceProvider);
            if (analyzer != null) {
                var buffer = subjectBuffers[0];

                foreach (var subjBuf in subjectBuffers) {
                    controller.PropagateAnalyzer(subjBuf);
                }

                var entry = analyzer.MonitorTextBuffer(textView, buffer);
                _hookedCloseEvents[textView] = Tuple.Create(entry.BufferParser, analyzer);
                textView.Closed += TextView_Closed;

                for (int i = 1; i < subjectBuffers.Count; i++) {
                    entry.BufferParser.AddBuffer(subjectBuffers[i]);
                }
                controller.SetBufferParser(entry.BufferParser);
            }
            return controller;
        }
开发者ID:KaushikCh,项目名称:PTVS,代码行数:25,代码来源:IntellisenseControllerProvider.cs

示例2: MethodExtractor

        public MethodExtractor(IServiceProvider serviceProvider, ITextView textView) {
            _view = textView;
            _serviceProvider = serviceProvider;
            var snapshot = _view.TextBuffer.CurrentSnapshot;

            _ast = _view.GetAnalyzer(_serviceProvider).ParseSnapshot(snapshot);
        }
开发者ID:wenh123,项目名称:PTVS,代码行数:7,代码来源:MethodExtractor.cs

示例3: MethodExtractor

        public MethodExtractor(ITextView textView)
        {
            _view = textView;
            var snapshot = _view.TextBuffer.CurrentSnapshot;

            _ast = _view.GetAnalyzer().ParseFile(snapshot);
        }
开发者ID:borota,项目名称:JTVS,代码行数:7,代码来源:MethodExtractor.cs

示例4: TryCreateIntellisenseController

        public IIntellisenseController TryCreateIntellisenseController(ITextView textView, IList<ITextBuffer> subjectBuffers)
        {
            IntellisenseController controller;
            if (!textView.Properties.TryGetProperty<IntellisenseController>(typeof(IntellisenseController), out controller)) {
                controller = new IntellisenseController(this, textView);
            }

            var analyzer = textView.GetAnalyzer();
            if (analyzer != null) {
                var buffer = subjectBuffers[0];

                foreach (var subjBuf in subjectBuffers) {
                    // TODO: Check whether `buffer` should be `subjBuf`
                    controller.PropagateAnalyzer(buffer);
                }

                var entry = analyzer.MonitorTextBuffer(textView, buffer);
                textView.Closed += (sender, args) => analyzer.StopMonitoringTextBuffer(entry.BufferParser);

                for (int i = 1; i < subjectBuffers.Count; i++) {
                    entry.BufferParser.AddBuffer(subjectBuffers[i]);
                }
                controller.SetBufferParser(entry.BufferParser);
            }
            return controller;
        }
开发者ID:borota,项目名称:JTVS,代码行数:26,代码来源:IntellisenseControllerProvider.cs

示例5: ImportRemover

        public ImportRemover(IServiceProvider serviceProvider, ITextView textView, bool allScopes) {
            _view = textView;
            _serviceProvider = serviceProvider;
            var snapshot = _view.TextBuffer.CurrentSnapshot;

            _ast = _view.GetAnalyzer(_serviceProvider).ParseSnapshot(snapshot);
            _allScopes = allScopes;
        }
开发者ID:omnimark,项目名称:PTVS,代码行数:8,代码来源:ImportRemover.cs

示例6: ImportRemover

        public ImportRemover(ITextView textView, bool allScopes)
        {
            _view = textView;
            var snapshot = _view.TextBuffer.CurrentSnapshot;

            _ast = _view.GetAnalyzer().ParseFile(snapshot);
            _allScopes = allScopes;
        }
开发者ID:borota,项目名称:JTVS,代码行数:8,代码来源:ImportRemover.cs


注:本文中的ITextView.GetAnalyzer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。