Renaming a Class or Interface
See Also
To rename a class or interface and update references to it throughout your project:
- In the Projects window or the Source Editor window, right-click the class
or interface and choose Refactor > Rename
from the contextual menu.
- In the Rename dialog box, type the New Name.
- Click Next.
- In the Refactoring window, review the lines of code that will be changed and
clear the checkbox of any code that you do not want changed.
- Click Do Refactoring to apply the selected changes.
- You should always perform a clean build after completing
any refactoring commands. You can do a clean build by right-clicking the project's
node in the Projects window and choosing Clean and Build Project.
To rename the file without doing refactoring:
- In the Projects window, rename the class's node inline.
You can rename a class this way by selecting the node of the class and
then pressing F2 to make the name editable.
- In the Rename dialog box, select the Rename Without Refactoring checkbox.
- Click Next.
- See Also
- Refactoring: Quick Reference
- Renaming a Field or Method
- Undoing Refactoring Changes
Legal Notices