1 instantiation of DocumentSymbolUIItem
Microsoft.VisualStudio.LanguageServices (1)
DocumentOutline\DocumentOutlineHelper.cs (1)
267var documentSymbolItem = new DocumentSymbolUIItem(documentSymbol, children, threadingContext);
38 references to DocumentSymbolUIItem
Microsoft.VisualStudio.LanguageServices (27)
DocumentOutline\DocumentOutlineControl.xaml.cs (1)
247if (sender is StackPanel panel && panel.DataContext is DocumentSymbolUIItem symbol)
DocumentOutline\DocumentOutlineControl_ModelComputation.cs (3)
176var symbolToSelect = DocumentOutlineHelper.GetDocumentNodeToSelect(documentSymbolUIItems, model.OriginalSnapshot, caretPoint.Value); 184DocumentOutlineHelper.SetIsExpanded(documentSymbolUIItems, (IEnumerable<DocumentSymbolUIItem>)SymbolTree.ItemsSource, expansion); 197DocumentOutlineHelper.UnselectAll((IEnumerable<DocumentSymbolUIItem>)SymbolTree.ItemsSource);
DocumentOutline\DocumentOutlineHelper.cs (21)
261public static ImmutableArray<DocumentSymbolUIItem> GetDocumentSymbolUIItems(ImmutableArray<DocumentSymbolData> documentSymbolData, IThreadingContext threadingContext) 263using var _ = ArrayBuilder<DocumentSymbolUIItem>.GetInstance(out var documentSymbolItems); 267var documentSymbolItem = new DocumentSymbolUIItem(documentSymbol, children, threadingContext); 277public static DocumentSymbolUIItem? GetDocumentNodeToSelect( 278ImmutableArray<DocumentSymbolUIItem> documentSymbolItems, 285DocumentSymbolUIItem? GetNodeToSelect(ImmutableArray<DocumentSymbolUIItem> documentSymbols, DocumentSymbolUIItem? parent) 287var selectedSymbol = GetNodeSelectedByCaret(documentSymbols); 296DocumentSymbolUIItem? GetNodeSelectedByCaret(ImmutableArray<DocumentSymbolUIItem> documentSymbolItems) 298foreach (var symbol in documentSymbolItems) 313ImmutableArray<DocumentSymbolUIItem> documentSymbolItems, 314IEnumerable<DocumentSymbolUIItem> currentDocumentSymbolItems, 331public static void ExpandAncestors(ImmutableArray<DocumentSymbolUIItem> documentSymbolItems, SnapshotSpan documentSymbolRangeSpan) 333var symbol = GetSymbolInRange(documentSymbolItems, documentSymbolRangeSpan); 340static DocumentSymbolUIItem? GetSymbolInRange(ImmutableArray<DocumentSymbolUIItem> documentSymbolItems, SnapshotSpan rangeSpan) 342foreach (var symbol in documentSymbolItems) 352internal static void UnselectAll(IEnumerable<DocumentSymbolUIItem> documentSymbolItems) 354foreach (var documentSymbolItem in documentSymbolItems)
DocumentOutline\DocumentSymbolUIItem.cs (2)
22public ImmutableArray<DocumentSymbolUIItem> Children { get; } 66public DocumentSymbolUIItem(DocumentSymbolData documentSymbolData, ImmutableArray<DocumentSymbolUIItem> children, IThreadingContext threadingContext)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (11)
DocumentOutline\DocumentOutlineTests.cs (11)
55private async Task<(DocumentOutlineTestMocks mocks, DocumentSymbolDataModel model, ImmutableArray<DocumentSymbolUIItem> uiItems)> InitializeMocksAndDataModelAndUIItems(string testCode) 161var nodeToSelect = DocumentOutlineHelper.GetDocumentNodeToSelect(uiItems, model.OriginalSnapshot, caretPosition); 205static void CheckNodeExpansion(ImmutableArray<DocumentSymbolUIItem> documentSymbolItems, bool isExpanded) 207foreach (var symbol in documentSymbolItems) 214static void CheckNodeExpansionMatches(ImmutableArray<DocumentSymbolUIItem> newUIItems, ImmutableArray<DocumentSymbolUIItem> originalUIItems) 233var selectedNode = uiItems.Single(parent => parent.Name.Equals("MyClass")).Children.Single(child => child.Name.Equals("Method2")); 239static void CheckAncestorNodeExpansion(ImmutableArray<DocumentSymbolUIItem> documentSymbolItems) 241foreach (var symbol in documentSymbolItems) 256static void CheckNodesUnselected(ImmutableArray<DocumentSymbolUIItem> documentSymbolItems) 258foreach (var symbol in documentSymbolItems)