You can rename symbols if the original declaration symbol is in your project, or if a project depended upon by your project contains the symbol and is in the same open project group. You can also rename error symbols.
To rename a symbol
- Select the symbol name in the Code Editor.
- Right-click to display the drop-down context menu.
- Select RefactoringRename 'symbol type' ' symbol name' where symbol type is either method, variable, or field, and symbol name is the actual name of the selected symbol. This displays the Rename dialog box.
- Enter the new name in the New Name text box.
- If you want to preview the changes to your project files, select the View References Before Refactoring check box.
Note: The menu commands are context-sensitive. If you select a method, the command will read Rename Methodmethod name where method name is the actual name of the method you have selected. This context-sensitivity holds true for all other object types, as well.