Skip to content

Conversation

@DoctorKrolic
Copy link
Contributor

@DoctorKrolic DoctorKrolic commented Jul 2, 2023

Commit 1: Added svm and sim snippets
Commits 2 and 3: I realized that there are many snippets that place caret target position inside a block. So I reused helper class (first renamed it, since it now deals not only with indentation) for common helper method for that

@akhera99 for review

@DoctorKrolic DoctorKrolic requested a review from a team as a code owner July 2, 2023 10:58
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead Community The pull request was submitted by a contributor who is not a Microsoft employee. labels Jul 2, 2023
@DoctorKrolic
Copy link
Contributor Author

@akhera99 PTAL

Copy link
Member

@akhera99 akhera99 left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the contribution!!!

@akhera99 akhera99 merged commit 4d0d1cc into dotnet:main Jul 18, 2023
@ghost ghost added this to the Next milestone Jul 18, 2023

namespace Microsoft.CodeAnalysis.CSharp.Snippets
{
[ExportSnippetProvider(nameof(ISnippetProvider), LanguageNames.CSharp), Shared]
Copy link
Contributor

Choose a reason for hiding this comment

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

❓ Is this name correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure what exactly name you mean here (ExportSnippetProvider or ISnippetProvider or something else), but everything should be right. You can verify it by pulling the latest main and verifying it on your own in VS hive. I always do that before submitting PRs, but I am not currently at my main main PC, so I cannot immediately provide the gif

Copy link
Contributor

Choose a reason for hiding this comment

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

➡️ It looks like nameof(ISnippetProvider) goes to a location which is ignored, and it just happens that all of the values are wrong in the code base. The intended use of a name in exporting would be to use nameof(CSharpIntMainSnippetProvider) or something similar. However, since the value is ignored and consistent with all the other cases, we can keep it like this for now.

Copy link
Contributor

@sharwell sharwell Jul 19, 2023

Choose a reason for hiding this comment

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

📝 It would be acceptable to send a PR to remove the Name property from ExportSnippetProviderAttribute.


namespace Microsoft.CodeAnalysis.CSharp.Snippets
{
[ExportSnippetProvider(nameof(ISnippetProvider), LanguageNames.CSharp), Shared]
Copy link
Contributor

Choose a reason for hiding this comment

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

❓ Is this name correct?

@allisonchou allisonchou modified the milestones: Next, 17.8 P1 Jul 24, 2023
@DoctorKrolic DoctorKrolic deleted the main-method-snippets branch July 29, 2023 08:42
@akhera99 akhera99 mentioned this pull request Mar 8, 2024
4 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. untriaged Issues and PRs which have not yet been triaged by a lead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants