2 overrides of WithChangedText
Microsoft.CodeAnalysis.CSharp (1)
Syntax\CSharpSyntaxTree.cs (1)
534public override SyntaxTree WithChangedText(SourceText newText)
Microsoft.CodeAnalysis.VisualBasic (1)
Syntax\VisualBasicSyntaxTree.vb (1)
100Public Overrides Function WithChangedText(newText As SourceText) As SyntaxTree
156 references to WithChangedText
IdeCoreBenchmarks (5)
IncrementalSourceGeneratorBenchmarks.cs (1)
168var changedTree = syntaxTree.WithChangedText(changedText);
SyntacticChangeRangeBenchmark.cs (4)
55var newTree = _tree.WithChangedText(newText); 64var newTree = _tree.WithChangedText(newText); 73var newTree = _tree.WithChangedText(newText); 82var newTree = _tree.WithChangedText(newText);
Microsoft.CodeAnalysis (4)
Syntax\SyntaxNode.cs (2)
353/// occurs when a <see cref="SyntaxTree"/> is incrementally parsed using <see cref="SyntaxTree.WithChangedText"/> 361/// from <see cref="SyntaxTree.WithChangedText"/>. This can happen as the parser is allowed to construct parse
Syntax\SyntaxToken.cs (2)
689/// occurs when a <see cref="SyntaxTree"/> is incrementally parsed using <see cref="SyntaxTree.WithChangedText"/> 697/// from <see cref="SyntaxTree.WithChangedText"/>. This can happen as the parser is allowed to construct parse
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\ParsedDocument.cs (1)
53var root = SyntaxTree.WithChangedText(text).GetRoot(cancellationToken);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenTupleTest.cs (1)
22618var newTree = startTree.WithChangedText(newText);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (15)
Semantics\BindingAwaitTests.cs (1)
32var newTree = tree.WithChangedText(newText);
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (6)
1525driver = driver.RunGenerators(compilation.AddSyntaxTrees(compilation.SyntaxTrees.First().WithChangedText(SourceText.From("")))); 1567driver = driver.RunGenerators(compilation.AddSyntaxTrees(compilation.SyntaxTrees.First().WithChangedText(SourceText.From(""" 1615driver = driver.RunGenerators(compilation.AddSyntaxTrees(compilation.SyntaxTrees.First().WithChangedText(SourceText.From(""" 1668driver = driver.RunGenerators(compilation.AddSyntaxTrees(compilation.SyntaxTrees.First().WithChangedText(SourceText.From(""" 1729compilation.SyntaxTrees.First().WithChangedText(SourceText.From(""" 1781compilation.SyntaxTrees.First().WithChangedText(SourceText.From("""
SourceGeneration\GeneratorDriverTests_Attributes_SimpleName.cs (8)
1160compilation.SyntaxTrees.Last().WithChangedText(SourceText.From(""" 1210compilation.SyntaxTrees.Last().WithChangedText(SourceText.From(""" 1266compilation.SyntaxTrees.First().WithChangedText(SourceText.From(""" 1423compilation.SyntaxTrees.First().WithChangedText(SourceText.From(""" 1468compilation.SyntaxTrees.First().WithChangedText(SourceText.From(""" 1520compilation.SyntaxTrees.First().WithChangedText(SourceText.From(""" 1571compilation.SyntaxTrees.First().WithChangedText(SourceText.From(""" 1633compilation.SyntaxTrees.Last().WithChangedText(SourceText.From("""
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
DeclarationTests.cs (1)
1003return _underlyingTree.WithChangedText(newText);
Symbols\Metadata\MetadataTypeTests.cs (2)
368var newTree = oldTree.WithChangedText(newIText); 383newTree = oldTree.WithChangedText(newIText);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (46)
IncrementalParsing\IncrementalParsingTests.cs (43)
499tree = tree.WithChangedText(text); 531tree = tree.WithChangedText(text); 576tree = tree.WithChangedText(text); 628var withOpenBraceDeletedTree = initialTree.WithChangedText(withOpenBraceDeletedText); 839var withCloseBraceDeletedTree = withOpenBraceDeletedTree.WithChangedText(withCloseBraceDeletedText); 966var newTree = startTree.WithChangedText(newText); 980var newTree = startTree.WithChangedText(newText); 2753var reparsedTree = tree.WithChangedText(text2); 2771var reparsedTree = startTree.WithChangedText(newText); 2794var reparsedTree = startTree.WithChangedText(newText); 2824var reparsedTree = startTree.WithChangedText(newText); 2852var reparsedTree = startTree.WithChangedText(newText); 2904var newTree = oldTree.WithChangedText(newIText); 2918newTree = oldTree.WithChangedText(newIText); 2988currTree = currTree.WithChangedText(currIText); 3024currTree = currTree.WithChangedText(currIText); 3103var incrTree = oldTree.WithChangedText(newText); 3182var newTree = oldTree.WithChangedText(newText); 3201tree = tree.WithChangedText(text); 3222tree = tree.WithChangedText(text); 3243tree = tree.WithChangedText(text); 3264tree = tree.WithChangedText(text); 3285tree = tree.WithChangedText(text); 3307tree = tree.WithChangedText(text); 3331tree = tree.WithChangedText(text); 3355tree = tree.WithChangedText(text); 3379tree = tree.WithChangedText(text); 3403tree = tree.WithChangedText(text); 3427tree = tree.WithChangedText(text); 3453tree = tree.WithChangedText(text); 3478tree = tree.WithChangedText(text); 3504tree = tree.WithChangedText(text); 3530tree = tree.WithChangedText(text); 3548tree = tree.WithChangedText(text); 3566tree = tree.WithChangedText(text); 3584tree = tree.WithChangedText(text); 3598tree = tree.WithChangedText(text); 3612tree = tree.WithChangedText(text); 3627tree = tree.WithChangedText(text); 3664tree = tree.WithChangedText(text); 3695incrementalTree = tree.WithChangedText(newText); 3703incrementalTree = tree.WithChangedText(newText); 3728incrementalTree = startTree.WithChangedText(newText);
Syntax\SyntaxNodeTests.cs (2)
886var tree2 = tree1.WithChangedText(tree1.GetText().WithChanges(new TextChange(default, " "))); 897var tree2 = tree1.WithChangedText(tree1.GetText().WithChanges(new TextChange(new TextSpan(22, 0), " return; ")));
Syntax\SyntaxTreeTests.cs (1)
149var newTree = tree.WithChangedText(SourceText.From("class C { }"));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
SyntaxTreeExtensions.cs (1)
21return syntaxTree.WithChangedText(newFullText);
Microsoft.CodeAnalysis.EditorFeatures (2)
CommentSelection\AbstractCommentSelectionBase.cs (1)
150var newRoot = oldSyntaxTree.WithChangedText(newText).GetRoot(cancellationToken);
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (1)
191var syntaxTreeWithOriginalName = syntaxTree.WithChangedText(newFullText);
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (68)
IncrementalParser\IncrementalParser.vb (67)
93tree = tree.WithChangedText(text) 113Dim newTree = tree.WithChangedText(newText) 130Dim newTree = oldTree.WithChangedText(newText) 139newTree = newTree.WithChangedText(anotherText) 707Dim incTree = oldTree.WithChangedText(newText) 745Dim incTree = oldTree.WithChangedText(newText) 772Dim incrementalTree = oldTree.WithChangedText(newText) 797Dim incrementalTree = oldTree.WithChangedText(newText) 832Dim newTree = oldTree.WithChangedText(newText) 869Dim newTree = oldTree.WithChangedText(newText) 889Dim newTree = oldTree.WithChangedText(newText) 910Dim newTree = oldTree.WithChangedText(newText) 939Dim newTree = oldTree.WithChangedText(newText) 968Dim newTree = oldTree.WithChangedText(newText) 992Dim newTree = oldTree.WithChangedText(newText) 1013Dim newTree = oldTree.WithChangedText(newText) 1033Dim newTree = oldTree.WithChangedText(newText) 1057Dim newTree = oldTree.WithChangedText(newText) 1083Dim newTree = oldTree.WithChangedText(newText) 1109Dim newTree = oldTree.WithChangedText(newText) 1126Dim newTree = tree.WithChangedText(newIText) 1144Dim newTree = fullTree.WithChangedText(fullText) 1163Dim newTree = tree.WithChangedText(newIText) 1170newTree = newTree.WithChangedText(newIText) 1187Dim newTree = fullTree.WithChangedText(fullText) 1209Dim newTree = tree.WithChangedText(newText) 1227Dim newTree = oldTree.WithChangedText(newText) 1245Dim newTree = oldTree.WithChangedText(newText) 1270Dim newTree = oldTree.WithChangedText(newText) 1294Dim newTree = oldTree.WithChangedText(newText) 1318Dim newTree = oldTree.WithChangedText(newText) 1342Dim newTree = oldTree.WithChangedText(newText) 1365Dim newTree = oldTree.WithChangedText(newText) 1388Dim newTree = oldTree.WithChangedText(newText) 1408Dim newTree = oldTree.WithChangedText(newText) 1428Dim newTree = oldTree.WithChangedText(newText) 1448Dim newTree = oldTree.WithChangedText(newText) 1468Dim newTree = oldTree.WithChangedText(newText) 1492Dim newTree = oldTree.WithChangedText(newText) 1525Dim newTree = oldTree.WithChangedText(newText) 1558Dim newTree = oldTree.WithChangedText(newText) 1587Dim newTree = oldTree.WithChangedText(newText) 1679Dim newTree = oldTree.WithChangedText(newText) 1772Dim newTree = oldTree.WithChangedText(newText) 1799Dim newTree = oldTree.WithChangedText(newText) 1828Dim newTree = oldTree.WithChangedText(newText) 1848Dim newTree = oldTree.WithChangedText(newText) 1867Dim newTree = oldTree.WithChangedText(newText) 1892Dim newTree = oldTree.WithChangedText(newText) 1925Dim newTree = oldTree.WithChangedText(newText) 1959Dim newTree = oldTree.WithChangedText(newText) 1989Dim newTree = oldTree.WithChangedText(newText) 2020Dim newTree = oldTree.WithChangedText(newText) 2052Dim newTree = oldTree.WithChangedText(newText) 2082Dim newTree = oldTree.WithChangedText(newText) 2114Dim newTree = oldTree.WithChangedText(newText) 2216Dim newTree = oldTree.WithChangedText(newText) 2248Dim newTree = oldTree.WithChangedText(newText) 2282Dim newTree = oldTree.WithChangedText(newText) 2308Dim newTree = oldTree.WithChangedText(newText) 2339Dim newTree = oldTree.WithChangedText(newText) 2372Dim newTree = oldTree.WithChangedText(newText) 2409Dim newTree = oldTree.WithChangedText(newText) 2437Dim newTree = oldTree.WithChangedText(newText) 2471Dim newTree = oldTree.WithChangedText(newText) 2496Dim newTree = oldTree.WithChangedText(newText) 2550Dim newTree = oldTree.WithChangedText(newText)
Syntax\SyntaxTreeTests.vb (1)
37Dim newTree = tree.WithChangedText(SourceText.From("Class B : End Class"))
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
ParserTestUtilities.vb (1)
228Dim incTree = oldTree.WithChangedText(newIText)
SyntaxTreeExtensions.vb (1)
19Return syntaxTree.WithChangedText(newFullText)
Microsoft.CodeAnalysis.Workspaces (2)
CodeCleanup\Providers\FormatCodeCleanupProvider.cs (1)
39? root.SyntaxTree.WithChangedText(oldText.WithChanges(result.GetTextChanges(cancellationToken))).GetRootAsync(cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\ParsedDocument.cs (1)
53var root = SyntaxTree.WithChangedText(text).GetRoot(cancellationToken);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Formatting\FormattingTestBase.cs (1)
93var resultRoot = await root.SyntaxTree.WithChangedText(resultText).GetRootAsync();
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
SymbolKeyTests.cs (1)
1419var newTree = syntaxTree.WithChangedText(text.WithChanges(new TextChange(new TextSpan(0, text.Length), text.ToString().Replace(" ", " "))));
SyntaxPathTests.cs (4)
96var newTree = tree.WithChangedText(newText); 110var newTree = tree.WithChangedText(newText); 403var newTree = tree.WithChangedText(newText); 431return syntaxTree.WithChangedText(newFullText);