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

Adds 💡 Implement Using Copilot for NotImplementedException #77299

Merged

Conversation

maryamariyan
Copy link
Member

@maryamariyan maryamariyan commented Feb 20, 2025

Offers 💡 Implement Using Copilot when NotImplementedException is present in code.

Implement_With_Copilot_Examples.mp4

wip
fix
see test below

```
    [InlineData("int myField;", typeof(FieldDeclarationSyntax))]
    public async Task TestInvalidNodeReplacement(string syntax, Type type)
```
@@ -70,6 +70,9 @@ public Test()
[StringSyntax(PredefinedEmbeddedLanguageNames.CSharpTest)]
public new string FixedCode { set => base.FixedCode = value; }

[StringSyntax(PredefinedEmbeddedLanguageNames.CSharpTest)]
public new string BatchFixedCode { set => base.BatchFixedCode = value; }
Copy link
Member

Choose a reason for hiding this comment

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

@sharwell to check on this. curious why we haven't needed this yet.

Copy link
Member

Choose a reason for hiding this comment

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

It's been around for a long time. It's needed for cases where Fix All in Document does not produce the same result as running the individual fixes in sequence.

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.

tentative signoff with Sam's signoff on the testing change, and the final changes requested done. Thanks. Looks awesome! Can't wait to try this out.

{
Contract.ThrowIfTrue(string.IsNullOrWhiteSpace(implementationDetails.Message));
replacement = AddErrorComment(methodOrProperty, implementationDetails.Message);
}
Copy link
Member

Choose a reason for hiding this comment

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

much nicer.

@maryamariyan
Copy link
Member Author

I don't seem to have merge privileges on roslyn repo. I'll need help with merging PR once CI is complete

@CyrusNajmabadi CyrusNajmabadi merged commit 2c39ea7 into dotnet:main Mar 13, 2025
28 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Mar 13, 2025
@maryamariyan maryamariyan deleted the dev/maryamariyan/replicate-for-features branch March 13, 2025 02:48
@@ -16,6 +16,7 @@
</PropertyGroup>
<ItemGroup Label="Project References">
<ProjectReference Include="..\..\..\Compilers\Core\Portable\Microsoft.CodeAnalysis.csproj" />
<ProjectReference Include="..\..\..\Compilers\CSharp\Portable\Microsoft.CodeAnalysis.CSharp.csproj" />
Copy link
Member

Choose a reason for hiding this comment

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

This was not ok. @maryamariyan this has to be removed as it is a layering violation.

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 VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants