Skip to content

Add records support in navigate to#48116

Merged
CyrusNajmabadi merged 9 commits intodotnet:masterfrom
Youssef1313:navigate-to-records
Sep 29, 2020
Merged

Add records support in navigate to#48116
CyrusNajmabadi merged 9 commits intodotnet:masterfrom
Youssef1313:navigate-to-records

Conversation

@Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented Sep 28, 2020

Before:

image

image

After:

image

image

@Youssef1313 Youssef1313 requested review from a team as code owners September 28, 2020 15:22
{
switch (info.Kind)
{
// TODO: Not sure what is the correct action for records.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I rename classesThatMayDeriveFromSystemObject to typesThatMayDeriveFromSystemObject and treat DeclaredSymbolInfoKind.Record the same as DeclaredSymbolInfoKind.Class?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't call it typesThatMayDeriveFromSystemObject as that would be everything. instead, call it classesOrRecordsThat...

@jinujoseph jinujoseph added Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee. labels Sep 28, 2020
@jcouv jcouv added the Feature - Records Records label Sep 28, 2020
}", async w =>
{
var item = (await _aggregator.GetItemsAsync("Goo")).Single(x => x.Kind != "Method");
VerifyNavigateToResultItem(item, "Goo", "[|Goo|]", PatternMatchKind.Exact, NavigateToItemKind.Record, Glyph.ClassInternal);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CyrusNajmabadi I'm not sure what you meant by this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

come to discord and we can discuss things there :)

@jcouv
Copy link
Member

jcouv commented Sep 28, 2020

Thanks for fixing this. Could you add an entry to the IDE test plan? I wasn't aware this was a separate scenario.

@Youssef1313 Youssef1313 requested a review from a team September 28, 2020 20:18
_callback.AddItem(navigateToItem);
}

private static string GetKind(string kind)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CyrusNajmabadi This is per our discussion in discord.
I hope I did it the correct way.

Copy link
Contributor

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@CyrusNajmabadi CyrusNajmabadi merged commit 71b1ab8 into dotnet:master Sep 29, 2020
@ghost ghost added this to the Next milestone Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee. Feature - Records Records

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants