IFileRenameProvider - only renames class within file if file is open in VS

Hi, As part of an extension for a file rename refactoring I am returning FileRename from GetFileRenames.My class has the FileRenameProvider attribute.  All works as expected (the code gets called as part of the class rename refactor) except the class within the files I identify are only renamed too if the file is open in VS at the time even though all the files are renamed.   yours confused...

1 comment

e.g. I need to do the following to ensure the class within the file is renamed too

EditorManager.GetInstance(solution).OpenProjectFile(projectFile, false);//needed to ensure class within file is renamed too
yield return new FileRename(psiModule.GetPsiServices(), projectFile, newFileName);


Please sign in to leave a comment.