1 instantiation of Edit
Microsoft.CodeAnalysis.Features (1)
Wrapping\Edit.cs (1)
70
return new
Edit
(leftLastToken, leftTrailingTrivia, rightFirstToken, rightLeadingTrivia);
46 references to Edit
Microsoft.CodeAnalysis.Features (46)
Wrapping\AbstractCodeActionComputer.cs (3)
120
ImmutableArray<
Edit
> edits, string parentTitle, string title, CancellationToken cancellationToken)
172
ImmutableArray<
Edit
> edits, CancellationToken cancellationToken)
177
foreach (
var
edit in edits)
Wrapping\BinaryExpression\BinaryExpressionCodeActionComputer.cs (9)
86
private async Task<ImmutableArray<
Edit
>> GetWrapEditsAsync(bool align, CancellationToken cancellationToken)
88
using var _ = ArrayBuilder<
Edit
>.GetInstance(out var result);
106
result.Add(
Edit
.UpdateBetween(left, _newlineBeforeOperatorTrivia, indentationTrivia, opToken));
107
result.Add(
Edit
.UpdateBetween(opToken, SingleWhitespaceTrivia, NoTrivia, right));
116
result.Add(
Edit
.UpdateBetween(left, SingleWhitespaceTrivia, NoTrivia, opToken));
117
result.Add(
Edit
.UpdateBetween(opToken, NewLineTrivia, indentationTrivia, right));
124
private ImmutableArray<
Edit
> GetUnwrapEdits()
127
var result = new FixedSizeArrayBuilder<
Edit
>(count);
131
result.Add(
Edit
.UpdateBetween(
Wrapping\ChainedExpression\ChainedExpressionCodeActionComputer.cs (7)
129
private async Task<ImmutableArray<
Edit
>> GetWrapEditsAsync(int wrappingColumn, bool align, CancellationToken cancellationToken)
131
using var _ = ArrayBuilder<
Edit
>.GetInstance(out var result);
159
result.Add(
Edit
.UpdateBetween(
177
private ImmutableArray<
Edit
> GetUnwrapEdits()
179
using var _ = ArrayBuilder<
Edit
>.GetInstance(out var result);
190
ArrayBuilder<
Edit
> result, ImmutableArray<SyntaxNodeOrToken> chunk)
194
result.Add(
Edit
.DeleteBetween(chunk[i - 1], chunk[i]));
Wrapping\Edit.cs (3)
54
public static
Edit
DeleteBetween(SyntaxNodeOrToken left, SyntaxNodeOrToken right)
57
public static
Edit
UpdateBetween(
64
public static
Edit
UpdateBetween(
Wrapping\SeparatedSyntaxList\SeparatedSyntaxListCodeActionComputer.cs (24)
97
WrappingStyle wrappingStyle, ArrayBuilder<
Edit
> result, CancellationToken cancellationToken)
100
?
Edit
.UpdateBetween(_listSyntax.GetFirstToken(), NewLineTrivia, await _singleIndentationTrivia.GetValueAsync(cancellationToken).ConfigureAwait(false), _listItems[0])
101
:
Edit
.DeleteBetween(_listSyntax.GetFirstToken(), _listItems[0]));
203
private async Task<ImmutableArray<
Edit
>> GetUnwrapAllEditsAsync(WrappingStyle wrappingStyle, CancellationToken cancellationToken)
205
using var _ = ArrayBuilder<
Edit
>.GetInstance(out var result);
208
result.Add(
Edit
.DeleteBetween(_listSyntax.GetFirstToken().GetPreviousToken(), _listSyntax.GetFirstToken()));
215
result.Add(
Edit
.DeleteBetween(comma.GetPreviousToken(), comma));
216
result.Add(
Edit
.DeleteBetween(comma, comma.GetNextToken()));
221
result.Add(
Edit
.DeleteBetween(last, _listSyntax.GetLastToken()));
289
private async Task<ImmutableArray<
Edit
>> GetWrapLongLinesEditsAsync(
292
using var _ = ArrayBuilder<
Edit
>.GetInstance(out var result);
296
result.Add(
Edit
.UpdateBetween(
324
result.Add(
Edit
.UpdateBetween(itemsAndSeparators[i - 1], SingleWhitespaceTrivia, NoTrivia, item));
331
result.Add(
Edit
.UpdateBetween(itemsAndSeparators[i - 1], NewLineTrivia, indentationTrivia, item));
341
result.Add(
Edit
.DeleteBetween(item, comma));
348
result.Add(
Edit
.UpdateBetween(
355
result.Add(
Edit
.DeleteBetween(itemsAndSeparators.Last(), _listSyntax.GetLastToken()));
424
private async Task<ImmutableArray<
Edit
>> GetWrapEachEditsAsync(
427
using var _ = ArrayBuilder<
Edit
>.GetInstance(out var result);
431
result.Add(
Edit
.UpdateBetween(
446
result.Add(
Edit
.DeleteBetween(item, comma));
451
result.Add(
Edit
.UpdateBetween(
458
result.Add(
Edit
.UpdateBetween(
466
result.Add(
Edit
.DeleteBetween(itemsAndSeparators.Last(), _listSyntax.GetLastToken()));