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

[Bug]: Missing rename popup in extract to local variable code action #40525

Closed
mindula opened this issue May 29, 2023 · 2 comments · Fixed by #42033
Closed

[Bug]: Missing rename popup in extract to local variable code action #40525

mindula opened this issue May 29, 2023 · 2 comments · Fixed by #42033
Assignees
Labels
Area/CodeAction Language Server Code Actions Priority/High Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Bug userCategory/Editor

Comments

@mindula
Copy link
Contributor

mindula commented May 29, 2023

Description

Consider the following scenario,

Screen.Recording.2023-05-29.at.08.03.21.mov

Steps to Reproduce

import ballerina/http;

final http:Client ep = check new ("https://localhost:9091/items",
    auth = {},
    secureSocket = {
        cert: "./resources/public.crt"
    });

Affected Version(s)

No response

OS, DB, other environment details and versions

No response

Related area

-> Editor

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@mindula mindula added Type/Bug Team/LanguageServer Language Server Implementation related issues. #Compiler Area/CodeAction Language Server Code Actions labels May 29, 2023
@ballerina-bot ballerina-bot added needTriage The issue has to be inspected and labeled manually userCategory/Editor labels May 29, 2023
@mindula mindula removed the needTriage The issue has to be inspected and labeled manually label May 29, 2023
@KavinduZoysa KavinduZoysa moved this to In Progress in Ballerina Team Main Board Jan 18, 2024
@mindula
Copy link
Contributor Author

mindula commented Jan 22, 2024

Currently, when calculating the rename position, we get the line range of the extractable node and increment the line number by 1. This approach gives the correct rename position when the values are on a single line. However, if the values are defined on multiple lines, the correct rename position can not be identified. Hence, we need to figure out an appropriate method to calculate the rename position. The same behaviour can also be seen in the Extract to constant code action.

Copy link

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

@KavinduZoysa KavinduZoysa added the Reason/EngineeringMistake The issue occurred due to a mistake made in the past. label Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/CodeAction Language Server Code Actions Priority/High Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Team/LanguageServer Language Server Implementation related issues. #Compiler Type/Bug userCategory/Editor
Projects
Archived in project
3 participants