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

Provide SourceGeneratedFileInfo for workspace symbols requests #2431

Merged
merged 3 commits into from
Aug 13, 2022

Conversation

333fred
Copy link
Contributor

@333fred 333fred commented Aug 12, 2022

Updates the workspace symbols requests to provide a SourceGeneratedFileInfo when the symbol is from a source generated file, so aware editors can retrieve information about the file and display it correctly, rather than showing no information.

Updates the workspace symbols requests to provide a SourceGeneratedFileInfo when the symbol is from a source generated file, so aware editors can retrieve information about the file and display it correctly, rather than showing no information.
333fred added a commit to 333fred/vscode-csharp that referenced this pull request Aug 12, 2022
VSCode side of OmniSharp/omnisharp-roslyn#2431. I also updated the source generated doc provider to have a lazy-fetch option, as we don't want to fetch and cache generated files for every single symbol that gets returned in a workspace symbol request.
@333fred
Copy link
Contributor Author

333fred commented Aug 12, 2022

@JoeRobich @filipw for review.

};
}

internal static SourceGeneratedFileInfo? GetSourceGeneratedFileInfo(Solution solution, Location location)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy/paste from GoToDefinitionHelpers, and modified to take a Solution instead of an OmniSharpWorkspace.

Copy link
Member

Choose a reason for hiding this comment

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

I believe this was intended to be the home for extension methods, so maybe it would be good to make this one too for consistency

filipw
filipw previously approved these changes Aug 12, 2022
Copy link
Member

@filipw filipw left a comment

Choose a reason for hiding this comment

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

this all makes sense to me. would it possible to add a test case too?

@333fred 333fred enabled auto-merge (squash) August 13, 2022 06:30
@333fred
Copy link
Contributor Author

333fred commented Aug 13, 2022

@filipw any other comments?

@333fred 333fred changed the title Provide SourceGeneratedFileInfo for workspace symbolls requests Provide SourceGeneratedFileInfo for workspace symbols requests Aug 13, 2022
Copy link
Member

@filipw filipw left a comment

Choose a reason for hiding this comment

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

thanks!

@333fred 333fred merged commit e06a8bf into OmniSharp:master Aug 13, 2022
@333fred 333fred deleted the find-all-generated branch August 13, 2022 15:52
333fred added a commit to dotnet/vscode-csharp that referenced this pull request Aug 13, 2022
VSCode side of OmniSharp/omnisharp-roslyn#2431. I also updated the source generated doc provider to have a lazy-fetch option, as we don't want to fetch and cache generated files for every single symbol that gets returned in a workspace symbol request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants