2 overrides of WithChangedText
Microsoft.CodeAnalysis.CSharp (1)
Syntax\CSharpSyntaxTree.cs (1)
535public override SyntaxTree WithChangedText(SourceText newText)
Microsoft.CodeAnalysis.VisualBasic (1)
Syntax\VisualBasicSyntaxTree.vb (1)
101Public Overrides Function WithChangedText(newText As SourceText) As SyntaxTree
164 references to WithChangedText
GenerateDocumentationAndConfigFiles (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\ParsedDocument.cs (1)
49var root = SyntaxTree.WithChangedText(text).GetRoot(cancellationToken);
IdeCoreBenchmarks (5)
IncrementalSourceGeneratorBenchmarks.cs (1)
162var 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)
354/// occurs when a <see cref="SyntaxTree"/> is incrementally parsed using <see cref="SyntaxTree.WithChangedText"/> 362/// from <see cref="SyntaxTree.WithChangedText"/>. This can happen as the parser is allowed to construct parse
Syntax\SyntaxToken.cs (2)
690/// occurs when a <see cref="SyntaxTree"/> is incrementally parsed using <see cref="SyntaxTree.WithChangedText"/> 698/// from <see cref="SyntaxTree.WithChangedText"/>. This can happen as the parser is allowed to construct parse
Microsoft.CodeAnalysis.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\ParsedDocument.cs (1)
49var root = SyntaxTree.WithChangedText(text).GetRoot(cancellationToken);
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\ParsedDocument.cs (1)
49var root = SyntaxTree.WithChangedText(text).GetRoot(cancellationToken);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\ParsedDocument.cs (1)
49var 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 (47)
IncrementalParsing\IncrementalParsingTests.cs (44)
498tree = tree.WithChangedText(text); 530tree = tree.WithChangedText(text); 575tree = tree.WithChangedText(text); 627var withOpenBraceDeletedTree = initialTree.WithChangedText(withOpenBraceDeletedText); 838var withCloseBraceDeletedTree = withOpenBraceDeletedTree.WithChangedText(withCloseBraceDeletedText); 1396var newTree = startTree.WithChangedText(newText); 1410var newTree = startTree.WithChangedText(newText); 3183var reparsedTree = tree.WithChangedText(text2); 3201var reparsedTree = startTree.WithChangedText(newText); 3224var reparsedTree = startTree.WithChangedText(newText); 3254var reparsedTree = startTree.WithChangedText(newText); 3282var reparsedTree = startTree.WithChangedText(newText); 3334var newTree = oldTree.WithChangedText(newIText); 3348newTree = oldTree.WithChangedText(newIText); 3418currTree = currTree.WithChangedText(currIText); 3454currTree = currTree.WithChangedText(currIText); 3533var incrTree = oldTree.WithChangedText(newText); 3612var newTree = oldTree.WithChangedText(newText); 3631tree = tree.WithChangedText(text); 3652tree = tree.WithChangedText(text); 3673tree = tree.WithChangedText(text); 3694tree = tree.WithChangedText(text); 3715tree = tree.WithChangedText(text); 3737tree = tree.WithChangedText(text); 3761tree = tree.WithChangedText(text); 3785tree = tree.WithChangedText(text); 3809tree = tree.WithChangedText(text); 3833tree = tree.WithChangedText(text); 3857tree = tree.WithChangedText(text); 3883tree = tree.WithChangedText(text); 3908tree = tree.WithChangedText(text); 3934tree = tree.WithChangedText(text); 3960tree = tree.WithChangedText(text); 3978tree = tree.WithChangedText(text); 3996tree = tree.WithChangedText(text); 4014tree = tree.WithChangedText(text); 4028tree = tree.WithChangedText(text); 4042tree = tree.WithChangedText(text); 4057tree = tree.WithChangedText(text); 4094tree = tree.WithChangedText(text); 4131tree = tree.WithChangedText(text); 4162incrementalTree = tree.WithChangedText(newText); 4170incrementalTree = tree.WithChangedText(newText); 4195incrementalTree = startTree.WithChangedText(newText);
Syntax\SyntaxNodeTests.cs (2)
909var tree2 = tree1.WithChangedText(tree1.GetText().WithChanges(new TextChange(default, " "))); 920var 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.PerformanceSensitiveAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\ParsedDocument.cs (1)
49var root = SyntaxTree.WithChangedText(text).GetRoot(cancellationToken);
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (68)
IncrementalParser\IncrementalParser.vb (67)
90tree = tree.WithChangedText(text) 110Dim newTree = tree.WithChangedText(newText) 127Dim newTree = oldTree.WithChangedText(newText) 136newTree = newTree.WithChangedText(anotherText) 704Dim incTree = oldTree.WithChangedText(newText) 742Dim incTree = oldTree.WithChangedText(newText) 769Dim incrementalTree = oldTree.WithChangedText(newText) 794Dim incrementalTree = oldTree.WithChangedText(newText) 829Dim newTree = oldTree.WithChangedText(newText) 866Dim newTree = oldTree.WithChangedText(newText) 886Dim newTree = oldTree.WithChangedText(newText) 907Dim newTree = oldTree.WithChangedText(newText) 936Dim newTree = oldTree.WithChangedText(newText) 965Dim newTree = oldTree.WithChangedText(newText) 989Dim newTree = oldTree.WithChangedText(newText) 1010Dim newTree = oldTree.WithChangedText(newText) 1030Dim newTree = oldTree.WithChangedText(newText) 1054Dim newTree = oldTree.WithChangedText(newText) 1080Dim newTree = oldTree.WithChangedText(newText) 1106Dim newTree = oldTree.WithChangedText(newText) 1123Dim newTree = tree.WithChangedText(newIText) 1141Dim newTree = fullTree.WithChangedText(fullText) 1160Dim newTree = tree.WithChangedText(newIText) 1167newTree = newTree.WithChangedText(newIText) 1184Dim newTree = fullTree.WithChangedText(fullText) 1206Dim newTree = tree.WithChangedText(newText) 1224Dim newTree = oldTree.WithChangedText(newText) 1242Dim newTree = oldTree.WithChangedText(newText) 1267Dim newTree = oldTree.WithChangedText(newText) 1291Dim newTree = oldTree.WithChangedText(newText) 1315Dim newTree = oldTree.WithChangedText(newText) 1339Dim newTree = oldTree.WithChangedText(newText) 1362Dim newTree = oldTree.WithChangedText(newText) 1385Dim newTree = oldTree.WithChangedText(newText) 1405Dim newTree = oldTree.WithChangedText(newText) 1425Dim newTree = oldTree.WithChangedText(newText) 1445Dim newTree = oldTree.WithChangedText(newText) 1465Dim newTree = oldTree.WithChangedText(newText) 1489Dim newTree = oldTree.WithChangedText(newText) 1522Dim newTree = oldTree.WithChangedText(newText) 1555Dim newTree = oldTree.WithChangedText(newText) 1584Dim newTree = oldTree.WithChangedText(newText) 1676Dim newTree = oldTree.WithChangedText(newText) 1769Dim newTree = oldTree.WithChangedText(newText) 1796Dim newTree = oldTree.WithChangedText(newText) 1825Dim newTree = oldTree.WithChangedText(newText) 1845Dim newTree = oldTree.WithChangedText(newText) 1864Dim newTree = oldTree.WithChangedText(newText) 1889Dim newTree = oldTree.WithChangedText(newText) 1922Dim newTree = oldTree.WithChangedText(newText) 1956Dim newTree = oldTree.WithChangedText(newText) 1986Dim newTree = oldTree.WithChangedText(newText) 2017Dim newTree = oldTree.WithChangedText(newText) 2049Dim newTree = oldTree.WithChangedText(newText) 2079Dim newTree = oldTree.WithChangedText(newText) 2111Dim newTree = oldTree.WithChangedText(newText) 2213Dim newTree = oldTree.WithChangedText(newText) 2245Dim newTree = oldTree.WithChangedText(newText) 2279Dim newTree = oldTree.WithChangedText(newText) 2305Dim newTree = oldTree.WithChangedText(newText) 2336Dim newTree = oldTree.WithChangedText(newText) 2369Dim newTree = oldTree.WithChangedText(newText) 2406Dim newTree = oldTree.WithChangedText(newText) 2434Dim newTree = oldTree.WithChangedText(newText) 2468Dim newTree = oldTree.WithChangedText(newText) 2493Dim newTree = oldTree.WithChangedText(newText) 2547Dim 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)
225Dim incTree = oldTree.WithChangedText(newIText)
SyntaxTreeExtensions.vb (1)
13Return syntaxTree.WithChangedText(newFullText)
Microsoft.CodeAnalysis.Workspaces (3)
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)
49var root = SyntaxTree.WithChangedText(text).GetRoot(cancellationToken);
Workspace\Solution\DocumentState.cs (1)
243var newTree = oldTree.WithChangedText(newText);
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);
Roslyn.Diagnostics.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\ParsedDocument.cs (1)
49var root = SyntaxTree.WithChangedText(text).GetRoot(cancellationToken);
Text.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\ParsedDocument.cs (1)
49var root = SyntaxTree.WithChangedText(text).GetRoot(cancellationToken);