-
Notifications
You must be signed in to change notification settings - Fork 420
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
Codeactions with options/ui. #1406
Codeactions with options/ui. #1406
Conversation
…/savpek/omnisharp-roslyn into feature/codeactions-with-options
I'm going to focus on getting this and the related analyzers in right away. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. We probably want to avoid a dependency on Castle.Core. Take a look at MetadataHelper on how it's done there.
@@ -16,6 +16,7 @@ | |||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" /> | |||
<PackageReference Include="Microsoft.CodeAnalysis.Common" /> | |||
<PackageReference Include="System.ComponentModel.Composition" /> | |||
<PackageReference Include="Castle.Core" Version="4.3.1" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to avoid a dependency for Castle.Core?
{ | ||
public class ExtractInterfaceWorkspaceService : IInterceptor | ||
{ | ||
public void Intercept(IInvocation invocation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid a dependency on Castle.Core, you can have a look in MetadataHelper on how this could be done.
In metadata helper concrete internal type is created (if i am not missing something completly 😄) but this is bit trickier since concrete implementation of internal interface is created without existing concrete implementation. Implementation for IPickMembersService for is in visual studio libraries and not available. However it think i can write solution based on https://stackoverflow.com/questions/8606412/create-type-that-implements-internal-interface which looks something like example there:
Which doesn't look too bad to write and should remove requirement for castle.core depency. |
@david-driscoll @filipw and @rchande, any opions on the above suggestion by @savpek? One problem is that neither |
I will try with |
One minor nit, otherwise we're good to go. |
@david-driscoll can you point me to that minor nit, i don't find any comment or anything for it 🙂 |
Looks like you fixed it 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@filipw @david-driscoll is anything holding this PR back at this point? Its bit burder to maintain PRs for extended period of time 🙂 |
sorry for the delay - this is good to go - thanks a lot for your hard work 👍 |
Resolves #1220
List:
This is bit trickier, may work OK if select first available parent interface as target.There are some parts that are internal that are reguired to implement this feature. Pending issue on dotnet/roslyn#33277. This is written with reflection/proxy combination which should be replaced once roslyn issue is addressed.
GenerateConstructorWithDialogCodeAction, GenerateOverridesWithDialogCodeAction, GenerateEqualsAndGetHashCodeWithDialogCodeAction:
Extract interface:
However extract interface isn't available before this code is merged with #1076 since it's action for one of analysis.