Small nav-to changes prior to some intensive rewrites.#53869
Small nav-to changes prior to some intensive rewrites.#53869CyrusNajmabadi merged 6 commits intodotnet:mainfrom
Conversation
| Glyph.EventPublic, | ||
| indent:=1, | ||
| spans:=allMethodSpans.ToImmutableArray(), | ||
| childItems:=rightHandMemberItems.ToImmutableArray()) |
There was a problem hiding this comment.
so this loks like we're losing data. However here's why this is safe:
- Only VB makes these ActionlessItem's
- We literally do nothing when an ActionlessItem is clicked on. You can see that here:
As we can, VB only supports doing something when a SymbolItem or AbstractGenerateCodeItem was the one selected. ActionlessItems are solely for having a hierarchy in the UI.
| // Set when kind == RoslynNavigationBarItemKind.Symbol | ||
|
|
||
| [DataMember(Order = 7)] | ||
| public readonly ImmutableArray<TextSpan> Spans; |
There was a problem hiding this comment.
spans are now a thing only for symbol-items. no other items need that.
| glyph: type.GetGlyph(), | ||
| isObsolete: type.IsObsolete(), | ||
| spans: GetSpansInDocument(type, tree, cancellationToken), | ||
| selectionSpan: GetSelectionSpan(type, tree), |
There was a problem hiding this comment.
these values are added for LSP purposes. note that spans/selectionSpan will be refactored again in my next pr which unifies span handling. It will unify handling of both 'entire entity span' vs 'navigation span' as well as 'span to navigate to if in the starting document' vs 'span to navigate to in another document'.
| [DataMember(Order = 11)] | ||
| public readonly SymbolKey? NavigationSymbolId; | ||
| [DataMember(Order = 12)] | ||
| public readonly int NavigationSymbolIndex; |
There was a problem hiding this comment.
NavigationSymbolId and NavigationSymbolIndex currently exist but will be removed in my followup PR. tools must not go back from tehse to symbols. instead, the service should accurately and uniquely define the behavior the consuming services need through simple data it passes back.
No description provided.