Skip to content
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

Stop renaming every variable in a project on F2. Look at the class and scope. #241352

Closed
smithcur opened this issue Feb 20, 2025 · 5 comments
Closed
Assignees
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@smithcur
Copy link

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.97.2
  • OS Version: Windows 11

Steps to Reproduce:

  1. Use F2 to rename a class variable.
  2. Look at all the classes in your project that it damages.

Description:

vscode replaces every occurrence of a rename (F2) across the project. Please stop doing that or provide a better way to rename member variables. The current way isn't helpful. Is simply corrupts everything else that has the same variable name. You have the intelligence in the application to determine scope and the class the rename should apply to. Use that information to only apply the change to the member of the class for the scope it has. Currently you only change references to the name but not all of the classes that have members with that name. That breaks every one of those classes by disassociating it with its member variable.

@gjsjohnmurray
Copy link
Contributor

Which language?

@smithcur
Copy link
Author

smithcur commented Feb 21, 2025 via email

@gjsjohnmurray
Copy link
Contributor

/causedByExtension

@vs-code-engineering vs-code-engineering bot added the *caused-by-extension Issue identified to be caused by an extension label Feb 21, 2025
Copy link

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines. If you don't know which extension is causing the problem, you can run Help: Start extension bisect from the command palette (F1) to help identify the problem extension.

Happy Coding!

@vs-code-engineering vs-code-engineering bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2025
@smithcur
Copy link
Author

Got it thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

3 participants