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

When using Rename Symbol (F2) with variable that contains number "sumOfLast3Months" only "Months" is shown in rename field. #212166

Closed
PawelWozniak opened this issue May 7, 2024 · 5 comments
Assignees
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@PawelWozniak
Copy link

PawelWozniak commented May 7, 2024

Does this issue occur when all extensions are disabled?: No, as the option is not available even when the language is changed to Java.

  • VS Code Version: 1.89.0
  • OS Version: Widnows 11

Steps to Reproduce:

  1. Create a variable named "sumOfLast3Months"
  2. Try to rename it using Rename Symbol (F2), you will see in popup only "Months"

image

  1. However variable is renamed correctly to a new name.

It seems like the text is somehow filtered and the number is breaking that.

@jrieken jrieken added the info-needed Issue requires more information from poster label May 7, 2024
@jrieken
Copy link
Member

jrieken commented May 7, 2024

What language/extension is used in that sample?

@PawelWozniak
Copy link
Author

PawelWozniak commented May 8, 2024

@jrieken It is Salesforce Apex. Similar to JAVA. Extensions used https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode
Just tested with disabled extensions and in such case, renaming is not available at all.

@jrieken
Copy link
Member

jrieken commented May 8, 2024

Sure, still please forward this issue to them. VS Code doesn't know what to rename unless the extension tells us (we only do a best effort). Their RenameProvider should implement prepareRename and/or they adjust the definition for what a word is (it seems they don't include numbers)

@jrieken jrieken added *caused-by-extension Issue identified to be caused by an extension and removed info-needed Issue requires more information from poster labels May 8, 2024
@VSCodeTriageBot
Copy link
Collaborator

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!

@PawelWozniak
Copy link
Author

@jrieken Thank you for explanation, created issue in Salesforce extension github forcedotcom/salesforcedx-vscode#5585

@microsoft microsoft locked and limited conversation to collaborators Jun 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

3 participants