Renaming a compilation unit

To rename a compilation unit:
    In the Package Explorer, select the compilation unit you want to rename.
    From the view's pop-up menu, select Refactor > Rename.
Renaming a compilation unit also renames (and updates 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 also renames class A and updates all references to it.
Related concepts

Refactoring support

Related tasks

Copying and moving Java elements
Viewing compilation errors and warnings
Creating a class in an existing compilation unit
Creating a new interface in a compilation unit
Showing a type's compilation unit in the Packages view

Related reference

Package Explorer
Refactoring actions
Refactoring wizard
Refactoring preferences
 

Copyright IBM Corporation 2000, 2002. All Rights Reserved.