本文整理汇总了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;
}
示例2: MethodExtractor
public MethodExtractor(IServiceProvider serviceProvider, ITextView textView) {
_view = textView;
_serviceProvider = serviceProvider;
var snapshot = _view.TextBuffer.CurrentSnapshot;
_ast = _view.GetAnalyzer(_serviceProvider).ParseSnapshot(snapshot);
}
示例3: MethodExtractor
public MethodExtractor(ITextView textView)
{
_view = textView;
var snapshot = _view.TextBuffer.CurrentSnapshot;
_ast = _view.GetAnalyzer().ParseFile(snapshot);
}
示例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;
}
示例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;
}
示例6: ImportRemover
public ImportRemover(ITextView textView, bool allScopes)
{
_view = textView;
var snapshot = _view.TextBuffer.CurrentSnapshot;
_ast = _view.GetAnalyzer().ParseFile(snapshot);
_allScopes = allScopes;
}