Renaming a Class or Interface

See Also

To rename a class or interface and update references to it throughout your project:

  1. In the Projects window or the Source Editor window, right-click the class or interface and choose Refactor > Rename from the contextual menu.
  2. In the Rename dialog box, type the New Name.
  3. Click Next.
  4. 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.
  5. Click Do Refactoring to apply the selected changes.

To rename the file without doing refactoring:

  1. 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.

  2. In the Rename dialog box, select the Rename Without Refactoring checkbox.
  3. Click Next.
See Also
Refactoring: Quick Reference
Renaming a Field or Method
Undoing Refactoring Changes

Legal Notices