-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move IVsHierarchyRefactorNotify notifications to Roslyn #5436
Comments
This will also fix #1422 because this code would also dismiss the rename tracking (as you can see it already does in CodeModel). |
@ocallesp This might a nice one to bite off, I can probably walk you through doing it during our 1 on 1. |
Do you mean "in response to a user renaming a |
Yes. |
The reason we didn't do tbis was that the CodeModel service is not cancelable so if a user begins a symbol rename and wants to cancel it they either need to wait or force the process to stop in task manager. |
Roslyn's internal notification service is cancelable (the one they use for inline rename) but it is not exposed anywhere publicly. If you can get the roslyn team to expose some kind of cancelable api I would love to not need this code. |
That's what this bug is tracking. |
@davkean got it, just didn't see cancellation called out as the blocker. Thanks for filing this :) |
My hope is that when this is merged: dotnet/roslyn#38488 We could just move all the rename logic over to roslyn itself since they are the real authority on what symbol rename should do. Us needing to re-implement everything like roslyn does is not an ideal long-term solution |
Also fixes: #1422.
We are notifying projects of renames in the workspace in response to a user renaming a file with a type with the same name, whereas legacy uses CodeModel from Roslyn which does it automatically. We do this so that XAML, RESX and other type consuming things can be notified and updated with the new names.
We should unify this logic into a single service and have both us and CodeModel call it, the lines in particular are this: https://github.com/dotnet/roslyn/blob/master/src/VisualStudio/Core/Impl/CodeModel/AbstractCodeModelService.cs#L498-L513.
The text was updated successfully, but these errors were encountered: