I’m writing a Resharper C# plugin, where I want to implement custom refactorings.
I copied the MakeSingleton refactoring from the docs and decided to implement it.
The goal is to introduce .Instance, convert static methods into non-static and refactor all call sites from MyClass.DoSomething(); → MyClass.Instance.DoSomething();
The refactoring passes all tests that I created for it, but it will fail to run on top of the Rider sandboxed app unless I have all files that need to be modified open.
Debugging through Solution.GetComponent(IDocumentStorageHelpers).SaveAllDocuments() I managed to see that this.GetUnsavedDocuments() contains all the modified files.
Debugging through the transactions after the refactoring is ran, I have the feeling that the solution-level refactoring should also have committed those files to disk.
I am not able to debug further when I get into the Rd protocol, which I believe is sending RPC messages to Rider to save the files, but it won’t.
What info do you need from me to debug this? I believe refactorings that span multiple files are supported, as Rider ships with introduce parameter and similar that affect multiple files already.