private static void RefactoringSetup( TestWorkspace workspace, CodeRefactoringProvider provider, List <CodeAction> codeActions, out EditorLayerExtensionManager.ExtensionManager extensionManager, out VisualStudio.Text.ITextBuffer textBuffer ) { var document = GetDocument(workspace); textBuffer = workspace.GetTestDocument(document.Id).GetTextBuffer(); var span = document.GetSyntaxRootAsync().Result.Span; var context = new CodeRefactoringContext( document, span, (a) => codeActions.Add(a), CancellationToken.None ); provider.ComputeRefactoringsAsync(context).Wait(); var action = codeActions.Single(); extensionManager = document.Project.Solution.Workspace.Services.GetService <IExtensionManager>() as EditorLayerExtensionManager.ExtensionManager; }
public VisualStudio.Text.ITrackingPoint GetTriggerPoint(VisualStudio.Text.ITextBuffer textBuffer) { if (textBuffer == _triggerPoint.TextBuffer) { return(_triggerPoint); } throw new NotImplementedException(); }
public VisualStudio.TextManager.Interop.IVsTextBuffer GetBufferAdapter(VisualStudio.Text.ITextBuffer textBuffer) { if (!textBuffer.Properties.TryGetProperty <MockVsTextLines>(typeof(MockVsTextLines), out MockVsTextLines textLines)) { textBuffer.Properties[typeof(MockVsTextLines)] = textLines = new MockVsTextLines(_serviceProvider, (MockTextBuffer)textBuffer); } return(textLines); }
public void SetDataBuffer(VisualStudio.TextManager.Interop.IVsTextBuffer bufferAdapter, VisualStudio.Text.ITextBuffer dataBuffer) { throw new NotImplementedException(); }
public VisualStudio.TextManager.Interop.IVsTextBuffer CreateVsTextBufferAdapterForSecondaryBuffer(Microsoft.VisualStudio.OLE.Interop.IServiceProvider serviceProvider, VisualStudio.Text.ITextBuffer secondaryBuffer) { throw new NotImplementedException(); }
public ICompletionSource TryCreateCompletionSource(VisualStudio.Text.ITextBuffer textBuffer) { return(new GuidCompletionSource(this.NavigatorService, textBuffer, vb: textBuffer.ContentType.IsOfType("Basic"))); }
public IBufferGraph CreateBufferGraph(VisualStudio.Text.ITextBuffer textBuffer) { throw new NotImplementedException(); }
public RequireCompletionAnalysis(VsProjectAnalyzer vsProjectAnalyzer, ITextSnapshot snapshot, VisualStudio.Text.ITrackingSpan applicableSpan, VisualStudio.Text.ITextBuffer textBuffer, bool quote) : base(applicableSpan, textBuffer) { _analyzer = vsProjectAnalyzer; _snapshot = snapshot; _applicableSpan = applicableSpan; _textBuffer = textBuffer; _quote = quote; }
public NormalCompletionAnalysis(VsProjectAnalyzer vsProjectAnalyzer, ITextSnapshot snapshot, VisualStudio.Text.ITrackingSpan applicableSpan, VisualStudio.Text.ITextBuffer textBuffer, GetMemberOptions options) : base(applicableSpan, textBuffer) { _analyzer = vsProjectAnalyzer; _snapshot = snapshot; _applicableSpan = applicableSpan; _textBuffer = textBuffer; _options = options; }