1 type derived from TextEdit
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Protocol\AnnotatedTextEdit.cs (1)
16internal class AnnotatedTextEdit : TextEdit
8 instantiations of TextEdit
Microsoft.CodeAnalysis.LanguageServer.Protocol (8)
Extensions\ProtocolConversions.cs (2)
330return new LSP.TextEdit 422uriToTextEdits.Add((CreateAbsoluteUri(mappedSpan.FilePath), new LSP.TextEdit
Handler\CodeActions\CodeActionResolveHelper.cs (1)
249var edit = new TextEdit { Range = emptyDocumentRange, NewText = newText.ToString() };
Handler\Completion\CompletionResultFactory.cs (3)
490lspItem.TextEdit = new LSP.TextEdit() 536builder.Add(new LSP.TextEdit() 681var textEdit = new LSP.TextEdit()
Handler\OnAutoInsert\OnAutoInsertHandler.cs (2)
132TextEdit = new LSP.TextEdit 196TextEdit = new LSP.TextEdit
48 references to TextEdit
Microsoft.CodeAnalysis.LanguageServer.Protocol (47)
Extensions\ProtocolConversions.cs (4)
327public static LSP.TextEdit TextChangeToTextEdit(TextChange textChange, SourceText oldText) 337public static TextChange TextEditToTextChange(LSP.TextEdit edit, SourceText oldText) 379using var _ = ArrayBuilder<(Uri Uri, LSP.TextEdit TextEdit)>.GetInstance(out var uriToTextEdits); 432var documentEdits = uriToTextEdits.GroupBy(uriAndEdit => uriAndEdit.Uri, uriAndEdit => new LSP.SumType<LSP.TextEdit, LSP.AnnotatedTextEdit>(uriAndEdit.TextEdit), (uri, edits) => new LSP.TextDocumentEdit
ExternalAccess\Razor\SimplifyMethodHandler.cs (4)
20internal class SimplifyMethodHandler : ILspServiceDocumentRequestHandler<SimplifyMethodParams, TextEdit[]?> 36public async Task<TextEdit[]?> HandleRequestAsync( 51internal static async Task<TextEdit[]> GetSimplifiedEditsAsync(Document originalDocument, TextEdit textEdit, CancellationToken cancellationToken)
ExternalAccess\Razor\SimplifyMethodParams.cs (1)
26public required TextEdit TextEdit { get; set; }
Handler\CodeActions\CodeActionResolveHelper.cs (2)
249var edit = new TextEdit { Range = emptyDocumentRange, NewText = newText.ToString() }; 289var edits = textChanges.Select(tc => new LSP.SumType<LSP.TextEdit, LSP.AnnotatedTextEdit>(ProtocolConversions.TextChangeToTextEdit(tc, oldText))).ToArray();
Handler\Completion\CompletionResultFactory.cs (4)
520public static async Task<LSP.TextEdit[]?> GenerateAdditionalTextEditForImportCompletionAsync( 530using var _ = ArrayBuilder<LSP.TextEdit>.GetInstance(out var builder); 665public static async Task<(LSP.TextEdit edit, bool isSnippetString, int? newPosition)> GenerateComplexTextEditAsync( 681var textEdit = new LSP.TextEdit()
Handler\Formatting\AbstractFormatDocumentHandlerBase.cs (2)
23protected static async Task<LSP.TextEdit[]?> GetTextEditsAsync( 45using var _ = ArrayBuilder<LSP.TextEdit>.GetInstance(out var edits);
Handler\Formatting\FormatDocumentHandler.cs (2)
18internal sealed class FormatDocumentHandler() : AbstractFormatDocumentHandlerBase<LSP.DocumentFormattingParams, LSP.TextEdit[]?> 22public override Task<LSP.TextEdit[]?> HandleRequestAsync(
Handler\Formatting\FormatDocumentOnTypeHandler.cs (3)
22internal sealed class FormatDocumentOnTypeHandler : ILspServiceDocumentRequestHandler<DocumentOnTypeFormattingParams, TextEdit[]?> 38public async Task<TextEdit[]?> HandleRequestAsync( 75using var _ = ArrayBuilder<TextEdit>.GetInstance(out var edits);
Handler\Formatting\FormatDocumentRangeHandler.cs (2)
18internal sealed class FormatDocumentRangeHandler() : AbstractFormatDocumentHandlerBase<DocumentRangeFormattingParams, TextEdit[]?> 22public override Task<TextEdit[]?> HandleRequestAsync(
Handler\InlayHint\InlayHintHandler.cs (2)
72TextEdit[]? textEdits = null; 75var textEdit = ProtocolConversions.TextChangeToTextEdit(hint.ReplacementTextChange.Value, text);
Handler\MapCode\MapCodeHandler.cs (4)
45using var _ = PooledDictionary<Uri, LSP.TextEdit[]>.GetInstance(out var uriToEditsMap); 50if (mappingResult is not (Uri uri, LSP.TextEdit[] textEdits)) 68Edits = kvp.Value.Select(v => new SumType<LSP.TextEdit, LSP.AnnotatedTextEdit>(v)).ToArray(), 80async Task<(Uri, LSP.TextEdit[])?> MapCodeAsync(LSP.VSInternalMapCodeMapping codeMapping)
Protocol\ColorPresentation.cs (4)
29/// A <see cref="Protocol.TextEdit"/> which is applied to a document when selecting this presentation for the color. 36public TextEdit? TextEdit { get; init; } 39/// An optional array of additional <see cref="Protocol.TextEdit"/> that are applied 47public TextEdit[]? AdditionalTextEdits { get; init; }
Protocol\CompletionItem.cs (4)
178/// <see cref="TextEdit.NewText"/> property on <see cref="TextEdit"/>. 209/// The <see cref="TextEdit.Range"/> must be single-line and must contain the position at which completion was requested. 227public SumType<TextEdit, InsertReplaceEdit>? TextEdit 268public TextEdit[]? AdditionalTextEdits
Protocol\InlayHint.cs (1)
74public TextEdit[]? TextEdits
Protocol\Internal\VSInternalDocumentOnAutoInsertResponseItem.cs (1)
35public TextEdit TextEdit
Protocol\Methods.Document.cs (3)
532public static readonly LspRequest<DocumentFormattingParams, TextEdit[]?> TextDocumentFormatting = new(TextDocumentFormattingName); 548public static readonly LspRequest<DocumentRangeFormattingParams, TextEdit[]?> TextDocumentRangeFormatting = new(TextDocumentRangeFormattingName); 564public static readonly LspRequest<DocumentOnTypeFormattingParams, TextEdit[]?> TextDocumentOnTypeFormatting = new(TextDocumentOnTypeFormattingName);
Protocol\Methods.DocumentSynchronization.cs (1)
77public static readonly LspRequest<WillSaveTextDocumentParams, TextEdit[]?> TextDocumentWillSaveWaitUntil = new(TextDocumentWillSaveWaitUntilName);
Protocol\TextDocumentEdit.cs (1)
39public SumType<TextEdit, AnnotatedTextEdit>[] Edits { get; set; }
Protocol\WorkspaceEdit.cs (2)
23public Dictionary<string, TextEdit[]>? Changes { get; set; } 36/// <see cref="WorkspaceEditSetting.ResourceOperations"/> then only plain <see cref="TextEdit"/>s
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Completion\CompletionTests.cs (1)
601var textEdit = GenerateTextEdit(@"\\A", startLine: 5, startChar: 19, endLine: 5, endChar: 19);