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