fsharp/fsharpbinding — pull request #520 by rojepp (2014-05-01 17:25:03+00:00)
Title: Generate interface refactoring

![implinterface2](https://cloud.githubusercontent.com/assets/445888/2854755/b3e20e28-d154-11e3-8cf2-2a8e5f549fa2.gif)

This is for Xamarin Studio 5. This is a new PR to target vnext instead of master.

Not ready for merge, I'm hoping to get some feedback on the code
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.

- [x] Implement as Monodevelop CodeAction
- [x] Support generics
- [x] Add ` with` if necessary. Do not ruin any comments on the same line. You only need to type `interface IDisposable` or `new IDisposable` to be able to invoke the command
- [ ] 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. IMHO this is not critical.
- [x] 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).
- [x] Find better indent level for object expressions