Add records support in navigate to#48116
Conversation
| { | ||
| switch (info.Kind) | ||
| { | ||
| // TODO: Not sure what is the correct action for records. |
There was a problem hiding this comment.
Should I rename classesThatMayDeriveFromSystemObject to typesThatMayDeriveFromSystemObject and treat DeclaredSymbolInfoKind.Record the same as DeclaredSymbolInfoKind.Class?
There was a problem hiding this comment.
don't call it typesThatMayDeriveFromSystemObject as that would be everything. instead, call it classesOrRecordsThat...
src/Features/Core/Portable/Navigation/NavigableItemFactory.DeclaredSymbolNavigableItem.cs
Outdated
Show resolved
Hide resolved
| }", async w => | ||
| { | ||
| var item = (await _aggregator.GetItemsAsync("Goo")).Single(x => x.Kind != "Method"); | ||
| VerifyNavigateToResultItem(item, "Goo", "[|Goo|]", PatternMatchKind.Exact, NavigateToItemKind.Record, Glyph.ClassInternal); |
There was a problem hiding this comment.
The NavigateToItemKind used here doesn't have "Record" in it.
I think this one comes from a package reference "Microsoft.VisualStudio.Language.NavigateTo.Interfaces"
@CyrusNajmabadi What's the correct action here?
Is this package developed in this same repo or it's internal? Does it need to be updated first? Why we even need it if we have another NavigateToItemKind available?
There was a problem hiding this comment.
We woudl need to map our type to something in the existing enum.
Is this package developed in this same repo or it's internal?
It's part of VS, outside of Roslyn :)
Does it need to be updated first?
Nope. We can just map our concepts to theirs. We can decide later if they need to expose the concept as well.
There was a problem hiding this comment.
@CyrusNajmabadi I'm not sure what you meant by this.
There was a problem hiding this comment.
come to discord and we can discuss things there :)
|
Thanks for fixing this. Could you add an entry to the IDE test plan? I wasn't aware this was a separate scenario. |
| _callback.AddItem(navigateToItem); | ||
| } | ||
|
|
||
| private static string GetKind(string kind) |
There was a problem hiding this comment.
@CyrusNajmabadi This is per our discussion in discord.
I hope I did it the correct way.
src/Features/Core/Portable/Navigation/NavigableItemFactory.DeclaredSymbolNavigableItem.cs
Outdated
Show resolved
Hide resolved
…laredSymbolNavigableItem.cs
Before:
After: