Dialog Options - Refactoring
Function: The dialog is used to define the operations in the project for which refactoring is automatically proposed. The refactoring functionality supports your enhancement efforts.
Call: TwinCAT > PLC programming environment > Refactoring
Auto declare | If you change the name of a variable or add an input or output variable by calling the autodeclaration (Auto Declare dialog) , the option Apply changes using refactoring, is automatically enabled. After confirming the dialog, the Refactoring dialog opens and you can change the variable project-wide. When adding or removing variables, or for changing the scope : Add a new input or output variable via the autodeclaration (Auto Declare dialog) or delete the name of a variable in the autodeclaration and close the dialog with OK. This will open the Refactoring dialog to add or remove the variable project-wide On renaming variables : Rename the name in the auto declaration (Auto Declare dialog) and close the dialog with OK. This opens the Refactoring dialog to rename the variable project-wide. |
Navigator | On renaming objects : If you change the name of an object in the PLC project tree, a prompt appears asking whether TwinCAT should carry out "Automatic refactoring". |
Tabular declaration editor | On renaming variables : If you change the name of a variable in the tabular declaration editor, a prompt appears asking whether TwinCAT should carry out "Automatic refactoring" for the renaming. |
UML class diagram | Options for refactoring support for changes made in the class diagram editor. When adding or removing variables : When you add or remove variables in the VAR_INPUT, VAR_OUTPUT, and VAR_IN_OUT sections in the class diagram, refactoring is supported. When renaming a function block : If you change a function block name in the class diagram, refactoring is supported. When renaming variables or properties : If you rename a variable or a property in the class diagram, refactoring is supported.
If the Skip Refactoring Preview option is enabled in the UML Options, refactoring may be performed on all affected locations in the project without first being displayed in the Refactoring dialog, depending on the case. (see Dialog Options - UML) |
See also:
- Command Auto Declare
- Command Rename '<variable>'
- Command Add '<variable>'
- Command Remove '<variable>'
- PLC documentation: Refactoring