robotframework-lsp icon indicating copy to clipboard operation
robotframework-lsp copied to clipboard

Refactoring integration in Intellij

Open AnushabalanTK opened this issue 3 years ago • 4 comments

Refactoring a keyword/variable is not working in robot framework.

Created a keyword with Login. Testcase is written using keyword Login. Later changed the keyword name to LoginAsAdministrator. But the change is not reflected in testcases where the keyword has been already used. Means refactoring is not working in Roboframework. This makes the framework maintainance difficult.

Alternate solution is Replace all. But this solution wont work for automation frameworks.

Refactoring is not working for variables and file names as well.

Refer the below stackoverflow query as well. https://stackoverflow.com/questions/54923015/how-to-refactor-codes-in-robot-framework

AnushabalanTK avatar Jun 07 '22 04:06 AnushabalanTK

Refactoring is currently only supported in the VSCode. The Intellij integration still needs to catch up (so, the language server supports it but the client doesn't).

p.s.: pull requests/patches welcome ;)

fabioz avatar Jun 07 '22 12:06 fabioz

Hello Thank you for the update.

Refactoring of keyword is working in VSCode. But I am unable to perform refactoring of filenames. Updated the Login.robot file to LoginUser.robot file. But the same is not getting updated in .robot files where it has been used. Path remains same (Resource ../../Login.robot)

AnushabalanTK avatar Jun 08 '22 09:06 AnushabalanTK

That's really unsupported (right now it supports only renaming variables and keywords).

I've created https://github.com/robocorp/robotframework-lsp/issues/692 to track this.

fabioz avatar Jun 08 '22 10:06 fabioz

currently refactor file still doesn't work in vscode

nanangfaisal avatar Mar 29 '23 17:03 nanangfaisal