mono/monodevelop — pull request #259 by kenkendk (2013-04-02 12:53:17+00:00)
Title: Added ResXFileCodeGenerator to MonoDevelop

This commit adds the ResXFileCodeGenerator to MonoDevelop.
In Visual Studio, the ResXFileCodeGenerator custom tool is responsible for building code-behind-like files from .resx, providing .resx file data as a typesafe class. This functionality has previously been missing in MonoDevelop.

The code "borrows" the AsyncThreadHandler from the TextTemplating (T4) module, through a linked file. I am not sure what the correct way of doing this is, but my solution seems cleaner than merely copying the file.

I have tested the plugin with Xamarin Studio on my own .resx files. It is possible that esoteric .resx files are not supported, but all those that contain text are. It should be simple to add support for multiple types data types.

Namespaces, etc are picked using the AssemblyBrowser plugin as a template.

The generated namespaces are correct in my setup, but I am unsure if there are other settings that can influence the generated namespace that needs handling.

The generated source code files are deliberately written to look as much as the VS ones, as that removes noise in a VCS when using multiple IDEs to edit the .resx files.