Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add records support in navigate to #48116

Merged
merged 9 commits into from
Sep 29, 2020

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
@@ -65,6 +65,7 @@ private static async Task<ProjectIndex> CreateIndexAsync(Project project, Cancel
{
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
Member

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
}", 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
Member

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
Member

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 as a code owner September 28, 2020 20:18
@@ -229,6 +229,48 @@ private void ReportMatchResult(Project project, INavigateToSearchResult result)
_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
Member

@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
@Youssef1313 Youssef1313 deleted the navigate-to-records branch September 29, 2020 09:44
@Cosifne Cosifne modified the milestones: Next, 16.9.P1 Oct 12, 2020
@Youssef1313 Youssef1313 mentioned this pull request Feb 18, 2021
92 tasks
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. New Language Feature - Records Records
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants