Renaming a Compilation Unit

Renaming a compilation unit will also rename (and update all references to) the top-level type that has the same name as the compilation unit. For example, renaming a compilation unit A.java in which a class A is declared will also rename class A and update all references to it.

To rename a compilation unit, select it in the Packages view, and from its context menu, select Rename.