I am writing a ICodeCleanupModule as suggested by Ilya on this feature request but am hitting some issues. The code I have is something like this:
CLRTypeName typeName = new CLRTypeName("System.String");
DeclaredTypeFromCLRName newType = new DeclaredTypeFromCLRName(typeName, variable.Module);
If this code is used against a ILocalVariableDeclarationNode instance that is defined as string, the type will not get updated as System.String or String. The type defined against ILocalVariableDeclarationNode for the string declaration is actually System.String under the covers anyway. It looks like ReSharper is using the defined CLR types internally, but always formats code to use the alias types in C#. This means that my formatting plugin will never be able to convert from alias types back to their full CLR type definition.
Any thoughts or pointers?