blob: 72894ee9018f15ab01ce57b81aaa5cbfbc13e69c [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
<title>
Moving a compilation unit
</title>
</head>
<body>
<h1>
Moving a compilation unit
</h1>
<p>
You can move a compilation unit to a different package. Imports and references are automatically updated.
</p>
<p>
To move a selected compilation unit and update all references to it:
</p>
<ol>
<li>
In the Package Explorer, select a compilation unit.
</li>
<li>
From the compilation unit's pop-up menu, select <strong>Move to Another Package</strong>. The Move Compilation Unit to Another Package page opens.
</li>
<li>
In the <strong>Choose package to move the compilation unit to</strong> field, type or click <strong>Browse</strong> to select the name of the package
where you want the compilation unit to move.
</li>
<li>
Click <strong>Next</strong> to perform a refactoring without preview, or click <strong>Finish</strong> to perform a refactoring with
preview.
</li>
</ol>
<p>
<img border="0" src="../images/ngrelc.png" alt="Related concepts" >
</p>
<p>
<a href="../concepts/concepts-9.htm">Refactoring support</a>
</p>
<p>
<img border="0" src="../images/ngrelt.png" alt="Related tasks" >
</p>
<p>
<a href="tasks-82.htm">Refactoring without preview</a><br>
<a href="tasks-83.htm">Refactoring with preview</a><br>
<a href="../tasks/tasks-92.htm">Renaming a compilation unit</a><br>
<a href="../tasks/tasks-51.htm">Moving folders, packages, and files</a><br>
<a href="../tasks/tasks-85.htm">Copying and moving Java elements</a>
</p>
<p>
<img border="0" src="../images/ngrelr.png" alt="Related reference" >
</p>
<p>
<a href="../reference/ref-view-package-explorer.htm">Package Explorer</a><br>
<a href="../reference/ref-menu-refactor.htm">Refactoring actions</a>
</p>
</body>
</html>