GoLand 2020.2 Help

Rename dialogs

Refactor | Rename


The Rename dialogs let you perform the rename refactoring for types, methods, packages, files and other entities. You can select where the changes to occurrences of the entity name are required and where not.

Rename <symbol name> and its usages toIn this field, specify a new name for the symbol.
Search in JavaScript files

Select this checkbox to rename the usages of the function or the class in compiled JavaScript code.

Search for dynamic references

Select this checkbox to rename the dynamic usages of the symbol, for example, those of the type any.

Including dynamic usages in the refactoring may cause erroneous renaming as shown in the example below. Here changing test() to test1() in rename.test() is correct while in hello.test() it is an error.

A dynamic usage of a symbol is erroneously renamed
Search in comments and stringsSelect this checkbox to have the changes applied to comments and strings.
Search for text occurrencesSelect this checkbox to have the changes applied to the documentation, HTML, and other files included in the project.
Last modified: 18 August 2020