fsharp/fsharpbinding — pull request #504 by rojepp (2014-04-27 22:45:10+00:00)
Title: Generate interface

First POC

![implinterface](https://cloud.githubusercontent.com/assets/445888/2812493/7f2e7e18-ce5d-11e3-88fc-b01022be2542.gif)

Not ready for merge, I'm mainly hoping to get a discussion going.
This is the first time we are implementing Monodevelop CodeActions. This will hopefully make new refactorings easy to add going forward.

@7sharp9 did the initial experimenting, and the bulk of the code is borrowed from Visual FSharp Power Tools. The file InterfaceGeneratorStub.fs is copied almost verbatim. Utils.fs from VFPT is included mostly to make InterfaceGeneratorStub compile and still be easily diffable.
This also raises an interesting question on code sharing. The VFPT guys have made the code very reusable, but we still have to copy/paste/diff. Should this common code be included in FCS, and is FCS nimble enough to quickly incorporate changes?

- [x] Implement as Monodevelop CodeAction
- [x] Support generics
- [ ] Don't display command if interface fully implemented, and only implement missing members if there are any. VFPT has this issue too: https://github.com/fsprojects/VisualFSharpPowerTools/issues/371
- [ ] Fix issue with implementing IDictionary
Same as VFPT: https://github.com/fsprojects/VisualFSharpPowerTools/issues/285
- [ ] Respect tab size settings when indenting generated methods. This is kind of hard, in that there are no tab size settings for F# specifically. There's only C#, Xml and Text (in my install). Maybe we could use settings from Text, until there are F# specific settings?
- [ ] Qualifier: At the moment, you can write an interface type name, right-click it and get it implemented. and still not have `interface ... with`. Should only show command if surrounded with `interface` and `with`.