-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Allow user to restrict scope of namespace rename changes #39426
Comments
Note, the user is renaming "Demo" to "Demo.UI" by pasting the desired namespace when in inline rename mode (same user as #3583 (comment)). |
@sandyarmstrong While we don't have a way to rename a selected namespace, I think "move to namespace" refactoring could be used as a workaround. |
@genlu I generally agree, though we don't have the "move to namespace" UI implemented yet in VSmac. Maybe we should prevent rename from working at all on namespaces? |
That, or we can properly support renaming selected namespace (i.e. move all enclosed types to namespace) and show an option in rename dialog. I will keep this issue open to track the design discussion |
Can we at least add an option to disable rename refactorings from working on namespaces? We get a lot of customer complaints about the behavior and it would be nice to just turn it off to avoid confusion. |
My preference here is to add an option to limit the rename effect within the current project in the UI. This option only shows up in the rename UI if the selected symbol is a namespace. |
I think we could add a checkbox, or even some sort of "Document | Project | Solution" scoping if wanted, similar to how we do with code fixes and refactorings in the light bulb. The UI would be different, but it would provide consistency with other places. |
Design Meeting Notes (2022-08-29):
Resolution:
|
From https://developercommunity.visualstudio.com/content/problem/738117/renaming-namespace-changes-namespaces-in-irreleven.html (and see also #3583):
The text was updated successfully, but these errors were encountered: