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