Refactoring

Rename Refactoring

To rename an entity (type, method, macro, etc.) in the source code along with all its references, place the cursor on the desired element and use the Rename Symbol command.

Provide the new name of the entity and click Enter to perform the refactoring operation or Shift+Enter to preview and select the changes that should be performed in the source code.

../../_images/rename_refactoring.gif

Tip

Matches hidden inside a macro call (matches found inside a macro call expansion, but not among the macro call parameters) cannot be automatically renamed.

Instead, DVT will insert a // FIXME comment above the macro call to indicate that it should be refactored by hand.

Rename in File

To rename a variable, signal, method, etc. within the current file, select the name of the element and use the Replace command. Write the new name and choose to replace occurrence by occurrence or all of them at once.

This is a lightweight Rename Refactoring which you should use in contexts where the renamed element is local to the file: local parameters, method argument names, local variables, signals of a module, etc.