GuOrg/Gu.Localization

Handle undo add to resource.

Opened this issue · 2 comments

We need to undo the edit of the resx file and the generated file.

Take a look at https://github.com/dotnet/roslyn/blob/master/src/VisualStudio/Core/Def/Packaging/PackageInstallerServiceFactory_UndoRedo.cs for how we do this in roslyn for uninstalling a nuget package on 'undo' if you install it with the lightbulb.

Would adding the resx as an additional document and then do text.WithChanges(...) enable undo?
Guess I can try it.
Alternatively split it up in two code actions, one that adds and one that does the text.WithChanges(...)
Also not sure if it will lead to other bs but guessing the sln is reparsed so that it does not matter.