fsharp/fsharpbinding — pull request #209 by Lewix (2013-09-19 17:57:05+00:00)
Title: FSharp Refactor integration (GSoC 2013)

This pull request contains the changes integrating the `fsharp-refactor` library into `fsharpbinding`. The project was carried out over the summer as part of Google Summer of Code, under the supervision of @rneatherway. Changes have been made in two main parts of the code base: the build process and the MonoDevelop add-in. I have merged in the most recent changes to the `master` branch of `fsharpbinding`.

## Build process modifications

`fsharp-refactor` is included as a submodule in the root of the project. `configure.sh` has been modified to initialise this submodule and recursively call `fsharp-refactor`'s configure script. The main makefile has also been updated to build `fsharp-refactor`.

Unrelated to the `fsharp-refactor` integration, I removed some unused code in `configure.sh`, and added auto-generated files such as `monodevelop/MonoDevelop.FSharp.local.fsproj` and `monodevelop/Makefile` to the `.gitignore` file. The aim of this is to avoid git constantly complaining that the fsproj file has been modified, and to avoid changes which are overwritten when the files are regenerated being committed.

## MonoDevelop add-in modifications

`FSharpLanguageBinding.fs` has been updated to start `fsharp-refactor`'s compile on project startup and to parse the current file in advance. This substantially reduces the lag when first right-clicking in a project. The `.addin.xml` file has been modified to include Rename as a refactoring (AddArgument and ExtractFunction aren't really usable enough yet). Unfortunately the issue with duplicate "Rename" refactorings (MonoDevelop's and `fsharp-refactor`'s) has not yet been resolved.

The rest of the changes are self-contained. There is a class for each new refactoring with shared code in `FSharpRefactor/FSharpRefactoring.fs`. An additional gtk dialog was created for choosing refactoring arguments.

## Cross-platform compatibility

The plugin has been developed and tested on Linux. I have however performed some basic testing in Xamarin Studio on Mac and Windows without issues (I had no menus on Mac OS, but that seems unrelated).