| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//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"> |
| <meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]"> |
| <title> |
| Copying and moving Java elements |
| </title> |
| <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| </head> |
| <body> |
| <h1> |
| Copying and moving Java elements |
| </h1> |
| <p> |
| To move Java elements: |
| </p> |
| <ol> |
| <li> |
| From a Java view, select the Java elements you want to move. |
| </li> |
| <li> |
| From the menu bar, select <strong>Refactor > Move</strong> or, from the view's pop-up menu, select <strong>Refactor > Move</strong>. |
| </li> |
| <li> |
| In the resulting dialog, select the new location for the element and press <strong>OK</strong>.<br> |
| <strong>Note:</strong> Moving static members (such as methods and types), classes or compilation units |
| allows you to choose to also update references to these elements. |
| Additional options may be available; for more on these options, see the |
| documentation for the corresponding "Rename" refactoring. |
| </li> |
| </ol> |
| <p> |
| You can also move Java elements by dragging them and dropping in the desired new location. |
| </p> |
| <p> |
| <strong>Note</strong>: Dragging and dropping compilation units and types allows you to update references to these elements. In the dialog that appears on dropping, press |
| <strong>Yes</strong> if you want to update references, press <strong>Preview</strong> if you want to see the preview of the reference updates, press <strong>No</strong> if |
| you want to move the elements without updating references or press <strong>Cancel</strong> if you want to cancel the move operation. |
| Additional options may be available; for more on these options, see the |
| documentation for the corresponding "Rename" refactoring. |
| </p> |
| <p> |
| </p> |
| <p> |
| To copy Java elements you need to copy them to the clipboard and paste them in the desired new location: |
| </p> |
| <ol> |
| <li> |
| From a Java view, select the Java elements you want to copy to the clipboard and do one of the following: |
| <ul> |
| <li> |
| Press <strong>Ctrl+C</strong> |
| </li> |
| <li> |
| From the menu bar, select <strong>Edit > Copy</strong> |
| </li> |
| <li> |
| From the view's pop-up menu, select <strong>Copy</strong> |
| </li> |
| </ul> |
| </li> |
| <li> |
| Now, to paste the elements, select the desired destination and do one of the following: |
| <ul> |
| <li> |
| Press <strong>Ctrl+V</strong> |
| </li> |
| <li> |
| From the menu bar, select <strong>Edit > Paste</strong> |
| </li> |
| <li> |
| From the view's pop-up menu, select <strong>Copy</strong> |
| </li> |
| </ul> |
| </li> |
| </ol> |
| <p> |
| You can also copy Java elements by dragging them and dropping in the desired new location. You will need to have <strong>Ctrl</strong> pressed while dragging to copy the |
| elements. |
| </p> |
| <p> |
| <img src="../images/ngrelc.png" alt="Related concepts" border="0" > |
| </p> |
| <p> |
| <a href="../concepts/concepts-3.htm">Java projects</a> |
| </p> |
| <p> |
| <img src="../images/ngrelt.png" alt="Related tasks" border="0" > |
| </p> |
| <p> |
| <a href="tasks-11.htm">Creating Java elements</a><br> |
| <a href="tasks-51.htm">Moving folders, packages, and files</a><br> |
| <a href="tasks-85.htm">Copying and moving Java elements</a> |
| </p> |
| <p> |
| <img src="../images/ngrelr.png" alt="Related reference" border="0" ><a href="../reference/ref-menu-edit.htm"></a> |
| </p> |
| <p> |
| <a href="../reference/ref-menu-edit.htm">Edit menu</a><br> |
| <a href="../reference/ref-menu-refactor.htm">Refactoring actions</a> |
| </p> |
| |
| </body> |
| </html> |
| |