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