612 references to SyntaxTree
Microsoft.CodeAnalysis (27)
DiagnosticAnalyzer\AnalysisContextInfo.cs (3)
43this(compilation: compilation, operation: null, symbol: null, file: new SourceOrAdditionalFile(node.SyntaxTree), node)
48this(compilation: compilation, operation: operation, symbol: null, file: new SourceOrAdditionalFile(operation.Syntax.SyntaxTree), node: operation.Syntax)
53this(compilation: compilation, operation: null, symbol: symbol, file: new SourceOrAdditionalFile(node.SyntaxTree), node)
Microsoft.CodeAnalysis.CodeStyle (33)
Microsoft.CodeAnalysis.CodeStyle.Fixes (13)
Microsoft.CodeAnalysis.CSharp (38)
Microsoft.CodeAnalysis.CSharp.CodeStyle (31)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (15)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Features (51)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (17)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (16)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (6)
CodeGeneration\CodeGenerationTests.cs (5)
97var info = testContext.Service.GetInfo(context ?? CodeGenerationContext.Default, options, root.SyntaxTree.Options);
323var info = testContext.Service.GetInfo(context ?? CodeGenerationContext.Default, options, oldSyntax.SyntaxTree.Options);
338var info = testContext.Service.GetInfo(context ?? CodeGenerationContext.Default, options, oldMemberSyntax.SyntaxTree.Options);
553var info = codeGenerator.GetInfo(CodeGenerationContext.Default, options, oldNode.SyntaxTree.Options);
594var info = codeGenerator.GetInfo(new CodeGenerationContext(reuseSyntax: true), options, declarationNode.SyntaxTree.Options);
Microsoft.CodeAnalysis.Features (107)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (34)
870newExceptionRegions[i] = GetExceptionRegions(ancestors, newStatement.SyntaxTree, cancellationToken).Spans;
878newActiveStatements[i] = GetActiveStatementWithSpan(oldActiveStatements[i], newBody.SyntaxTree, newStatementSpan, diagnostics, cancellationToken);
986newActiveStatements[activeStatementIndex] = GetActiveStatementWithSpan(oldActiveStatements[activeStatementIndex], newDeclaration.SyntaxTree, newSpan, diagnostics, cancellationToken);
1215newActiveStatements[activeStatementIndex] = GetActiveStatementWithSpan(oldActiveStatements[activeStatementIndex], newDeclaration.SyntaxTree, newSpan, diagnostics, cancellationToken);
1347newExceptionRegions[ordinal] = GetExceptionRegions(newAncestors, newStatementSyntax.SyntaxTree, cancellationToken).Spans;
1574return GetExceptionRegions(ancestors, syntaxRoot.SyntaxTree, cancellationToken);
1985var oldTree = topMatch.OldRoot.SyntaxTree;
1986var newTree = topMatch.NewRoot.SyntaxTree;
2482var newTypeDeclaration = GetSymbolDeclarationSyntax(newSymbol.DeclaringSyntaxReferences.First(r => r.SyntaxTree == edit.NewNode!.SyntaxTree), cancellationToken);
2511if (oldSymbol == null || oldDeclaration != null && oldDeclaration.SyntaxTree != oldModel?.SyntaxTree)
2515else if (newSymbol == null || newDeclaration != null && newDeclaration.SyntaxTree != newModel.SyntaxTree)
2544IsPartialEdit(oldContainingType, newContainingType, editScript.Match.OldRoot.SyntaxTree, editScript.Match.NewRoot.SyntaxTree) ? containingTypeSymbolKey : null));
2584IsPartialEdit(oldType, newType, editScript.Match.OldRoot.SyntaxTree, editScript.Match.NewRoot.SyntaxTree) ? symbolKey : null));
2623newActiveStatements[index] = GetActiveStatementWithSpan(oldActiveStatements[index], editScript.Match.NewRoot.SyntaxTree, newSpan, diagnostics, cancellationToken);
2844var oldSyntaxDocument = oldProject.Solution.GetRequiredDocument(oldDeclaration.SyntaxTree);
3184partialType: IsPartialEdit(oldSymbol, newSymbol, editScript.Match.OldRoot.SyntaxTree, editScript.Match.NewRoot.SyntaxTree) ? symbolKey : null, processedSymbols,
3198IsPartialEdit(oldSymbol, newSymbol, editScript.Match.OldRoot.SyntaxTree, editScript.Match.NewRoot.SyntaxTree) ? symbolKey : null));
3236IsPartialEdit(oldContainingType, newContainingType, editScript.Match.OldRoot.SyntaxTree, editScript.Match.NewRoot.SyntaxTree) ? containingTypeSymbolKey : null));
3291IsPartialEdit(oldSymbol, newSymbol, editScript.Match.OldRoot.SyntaxTree, editScript.Match.NewRoot.SyntaxTree) ? symbolKey : null));
3424partialType: IsPartialEdit(oldSymbol, newSymbol, editScript.Match.OldRoot.SyntaxTree, editScript.Match.NewRoot.SyntaxTree) ? symbolKey : null, processedSymbols,
4262IsPartialEdit(oldSymbol, newSymbol, topMatch.OldRoot.SyntaxTree, topMatch.NewRoot.SyntaxTree) ? symbolKey : null));
4268IsPartialEdit(oldSymbol.ContainingSymbol, newSymbol.ContainingSymbol, topMatch.OldRoot.SyntaxTree, topMatch.NewRoot.SyntaxTree) ? containingTypeSymbolKey : null));
4868var oldSyntaxTree = topMatch.OldRoot.SyntaxTree;
4869var newSyntaxTree = topMatch.NewRoot.SyntaxTree;
4965if (oldCtor != null && newDeclaration.SyntaxTree == newSyntaxTree && anyInitializerUpdatesInCurrentDocument)
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (7)
484codeGenerator.GetInfo(GetAddContext<IPropertySymbol>(parameter, blockStatement, typeDeclaration, cancellationToken), options, root.SyntaxTree.Options),
491codeGenerator.GetInfo(GetAddContext<IFieldSymbol>(parameter, blockStatement, typeDeclaration, cancellationToken), options, root.SyntaxTree.Options),
511if (propertySyntax.SyntaxTree == root.SyntaxTree)
519var otherDocument = currentSolution.GetDocument(propertySyntax.SyntaxTree);
522var otherRoot = await propertySyntax.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
818foreach (var group in accessors.GroupBy(node => node.SyntaxTree))
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Microsoft.CodeAnalysis.Test.Utilities (3)
Microsoft.CodeAnalysis.VisualBasic (38)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (5)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (7)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (3)
Microsoft.CodeAnalysis.VisualBasic.Features (13)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (7)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (3)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (13)
Microsoft.CodeAnalysis.Workspaces (48)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (15)
SolutionTests\SolutionTests.cs (14)
594Assert.Equal(parseOptions1, root1.SyntaxTree.Options);
595Assert.Equal(parseOptions2, root2.SyntaxTree.Options);
621Assert.Equal(parseOptions1, root1.SyntaxTree.Options);
622Assert.Equal(parseOptions2, root2.SyntaxTree.Options);
645Assert.Equal(parseOptions1, root1.SyntaxTree.Options);
646Assert.Equal(parseOptions2, root2.SyntaxTree.Options);
1837Assert.Equal(SourceHashAlgorithm.Sha1, root.SyntaxTree.GetText().ChecksumAlgorithm);
1866Assert.Equal(SourceHashAlgorithm.Sha1, root.SyntaxTree.GetText().ChecksumAlgorithm);
2601Assert.Same(tree, root.SyntaxTree);
3052Assert.Equal(tree, root.SyntaxTree);
3069Assert.Equal(tree2, root2.SyntaxTree);
3145Assert.Same(tree2, tree2.GetRoot().SyntaxTree);
3173Assert.Same(tree3, tree3.GetRoot().SyntaxTree);
3184Assert.Same(tree4, tree4.GetRoot().SyntaxTree);
Microsoft.VisualStudio.LanguageServices (4)
Microsoft.VisualStudio.LanguageServices.CSharp (30)
CodeModel\CSharpCodeModelService.NodeLocator.cs (27)
240return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
273return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
303return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
351return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
430return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
505return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
554return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
603return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
643return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
676return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
717return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
757return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
797return new VirtualTreePoint(node.SyntaxTree, text, startPosition);
815return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
848return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
878return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
919return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
993return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
1053return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
1092return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
1133return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
1171return new VirtualTreePoint(fileScopedNamespace.SyntaxTree, text, fileScopedNamespace.Parent.Span.End);
1182return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
1215return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
1256return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
1298return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
1339return new VirtualTreePoint(node.SyntaxTree, text, endPosition);
Microsoft.VisualStudio.LanguageServices.Implementation (4)
Microsoft.VisualStudio.LanguageServices.VisualBasic (42)
CodeModel\VisualBasicCodeModelService.NodeLocator.vb (39)
249Return New VirtualTreePoint(attributes.First().SyntaxTree, text, startPosition)
281Return New VirtualTreePoint(attributes.Last().SyntaxTree, text, startPosition)
357Return New VirtualTreePoint(typeBlock.SyntaxTree, text, startPosition)
383Return New VirtualTreePoint(typeBlock.SyntaxTree, text, startPosition)
428Return New VirtualTreePoint(enumBlock.SyntaxTree, text, startPosition)
454Return New VirtualTreePoint(enumBlock.SyntaxTree, text, startPosition)
513Return New VirtualTreePoint(methodBlock.SyntaxTree, text, startPosition)
549Return New VirtualTreePoint(declareStatement.SyntaxTree, text, startPosition)
578Return New VirtualTreePoint(declareStatement.SyntaxTree, text, endPosition)
614Return New VirtualTreePoint(methodStatement.SyntaxTree, text, startPosition)
669Return New VirtualTreePoint(methodBlock.SyntaxTree, text, startPosition)
698Return New VirtualTreePoint(methodStatement.SyntaxTree, text, endPosition)
737Return New VirtualTreePoint(propertyStatement.SyntaxTree, text, startPosition)
782Return New VirtualTreePoint(propertyStatement.SyntaxTree, text, startPosition)
822Return New VirtualTreePoint(eventBlock.SyntaxTree, text, startPosition)
859Return New VirtualTreePoint(eventStatement.SyntaxTree, text, startPosition)
904Return New VirtualTreePoint(eventStatement.SyntaxTree, text, startPosition)
940Return New VirtualTreePoint(delegateStatement.SyntaxTree, text, startPosition)
969Return New VirtualTreePoint(delegateStatement.SyntaxTree, text, endPosition)
1035Return New VirtualTreePoint(namespaceBlock.SyntaxTree, text, startPosition)
1066Return New VirtualTreePoint(namespaceBlock.SyntaxTree, text, endPosition)
1098Return New VirtualTreePoint(variable.SyntaxTree, text, startPosition)
1123Return New VirtualTreePoint(enumMember.SyntaxTree, text, startPosition)
1150Return New VirtualTreePoint(variable.SyntaxTree, text, endPosition)
1174Return New VirtualTreePoint(enumMember.SyntaxTree, text, endPosition)
1204Return New VirtualTreePoint(parameter.SyntaxTree, text, startPosition)
1228Return New VirtualTreePoint(parameter.SyntaxTree, text, endPosition)
1254Return New VirtualTreePoint(importsStatement.SyntaxTree, text, startPosition)
1280Return New VirtualTreePoint(importsStatement.SyntaxTree, text, endPosition)
1306Return New VirtualTreePoint(optionStatement.SyntaxTree, text, startPosition)
1332Return New VirtualTreePoint(optionStatement.SyntaxTree, text, endPosition)
1358Return New VirtualTreePoint(inheritsStatement.SyntaxTree, text, startPosition)
1384Return New VirtualTreePoint(inheritsStatement.SyntaxTree, text, endPosition)
1410Return New VirtualTreePoint(implementsStatement.SyntaxTree, text, startPosition)
1436Return New VirtualTreePoint(implementsStatement.SyntaxTree, text, endPosition)
1465Return New VirtualTreePoint(attribute.SyntaxTree, text, startPosition)
1493Return New VirtualTreePoint(attribute.SyntaxTree, text, endPosition)
1528Return New VirtualTreePoint(argument.SyntaxTree, text, startPosition)
1562Return New VirtualTreePoint(argument.SyntaxTree, text, endPosition)
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (1)