-
Notifications
You must be signed in to change notification settings - Fork 57
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
Generate interface implementation members #129
Generate interface implementation members #129
Conversation
I recommend to look at https://github.com/fsprojects/Archive-VisualFSharpPowerTools/blob/master/src/FSharp.Editing/CodeGeneration/InterfaceStubGenerator.fs for ideas etc. |
Please make it a quick fix instead of a context action. Here's an example QF working on the same/similar errors you're after: b28b01d. |
Hi @auduchinok, this one's pretty much good to go, but can't get the quick fix for an BTW I realise this doesn't cover object expressions, I'm fairly sure I can generalise this in future. |
Great feature! Any progress on this? |
Hi @auduchinok, I've merged in Taking a look at making this one a quick fix, it seems that I'd be looking to match a parse error (https://github.com/fsharp/FSharp.Compiler.Service/blob/1d173b6e753199f4598f6283ff5ecac811cad18e/src/fsharp/FSStrings.resx#L486), which gets mapped to Cheers, |
Hi @mcon, I'm sorry for the late response here. I've merged in
It was almost correct: there actually may be no parameters pattern, and that would mean the member declaration is a property declaration.
Yes, if there's a What else is needed to be done here (I'll add more if anything comes to my mind):
|
* Convert to quick fix * Generate properties * Handle partial implementations
# Conflicts: # ReSharper.FSharp/test/src/FSharp.Tests/Parsing/FSharpParserTest.fs
I've implemented things needed for what it seems the most common cases (the todo list has became rather long here) and am going to handle the missing parts out of scope of this PR. |
@mcon Thanks for your contribution! It worked as a good starting point, and we're almost there now, I think it'll work great once the remaining pieces are done. |
Summary
Able to generate placeholder implementations of interfaces for a particular class. The implementation does the bare bones, and is at present only able to handle the interface implementation being completely empty.
e.g.
to
TODO
with
keyword if it's missing from theIInterfaceImplementation