| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]"> |
| <title> |
| Renaming a compilation unit |
| </title> |
| <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| </head> |
| <body> |
| <h1> |
| Renaming a compilation unit |
| </h1> |
| <p> |
| To rename a compilation unit: |
| </p> |
| <ol> |
| <li> |
| In the Package Explorer, select the compilation unit you want to rename. |
| </li> |
| <li> |
| From the view's pop-up menu, select <strong>Refactor</strong> > <strong>Rename</strong>. |
| </li> |
| </ol> |
| <p> |
| 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 <em>A.java</em> in which a class <em>A</em> is declared also renames class <em>A</em> and updates all references to it. |
| </p> |
| <img src="../images/ngrelc.gif" alt="Related concepts" border="0" height="27" width="159"> |
| <p> |
| <a href="../concepts/concepts-9.htm">Refactoring support</a> |
| </p> |
| <p> |
| <img src="../images/ngrelt.gif" alt="Related tasks" border="0" height="27" width="159"> |
| </p> |
| <p> |
| <a href="tasks-85.htm">Copying and moving Java elements</a><br> |
| <a href="tasks-107.htm">Viewing compilation errors and warnings</a><br> |
| <a href="tasks-20.htm">Creating a class in an existing compilation unit</a><br> |
| <a href="tasks-25.htm">Creating a new interface in a compilation unit</a><br> |
| <a href="tasks-74.htm">Showing a type's compilation unit in the Packages view</a> |
| </p> |
| <p> |
| <img src="../images/ngrelr.gif" alt="Related reference" border="0" height="27" width="159"> |
| </p> |
| <p> |
| <a href="../reference/ref-view-package-explorer.htm">Package Explorer</a><br> |
| <a href="../reference/ref-menu-refactor.htm">Refactoring actions</a><br> |
| <a href="../reference/ref-117.htm">Refactoring dialogs</a><br> |
| <a href="../reference/ref-23.htm">Refactoring preferences</a> |
| </p> |
| <p> |
| <a href="../hglegal2003.htm"><img src="../images/ngibmcpy2003.gif" alt="Copyright (c) 2000, 2003 IBM Corporation and others. All Rights Reserved." border="0" width="324" height="14"></a> |
| </p> |
| </body> |
| </html> |
| |