| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
| <html> |
| <head> |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. 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> |
| Replacing a Java element with a local history edition |
| </title> |
| <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script> |
| </head> |
| <body> |
| <h1> |
| Replacing a Java element with a local history edition |
| </h1> |
| <ol> |
| <li> |
| Make sure that a Java view is visible. |
| </li> |
| <li> |
| Open a Java editor for the Java file in which you want to replace a Java element with an edition from the local history. |
| </li> |
| <li> |
| Activate the editor by clicking its tab in the editor area. The Outline view also displays the Java file. |
| <em>Note: The Package Explorer can be configured to show or not show |
| Java elements in files. Use the |
| <strong>Show Members in Package Explorer</strong> checkbox on the |
| <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.AppearancePreferencePage)")'> |
| <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Appearance preference page"> |
| <strong>Java > Appearance</strong></a> preference page to set your preference.</em> |
| </li> |
| <li> |
| Select the element that you want to replace in the Outline or the Package Explorer. |
| </li> |
| <li> |
| From the element's pop-up menu, select <strong>Replace With > Element from Local History</strong>. |
| </li> |
| <li> |
| In the upper pane of the resulting dialog, all available editions of the selected element in the local history are displayed. |
| </li> |
| <li> |
| Select an edition in the upper pane to view the differences between the selected edition and the edition in the workbench. |
| </li> |
| <li> |
| When you have identified the edition with which you want to replace the existing Java element, click <strong>Replace</strong>. |
| </li> |
| <li> |
| The local history edition replaces the current one in the editor. <em>Note: The changed compilation unit has not yet been saved at this point.</em> |
| </li> |
| </ol> |
| <p> |
| <img src="../images/ngrelc.png" alt="Related concepts" border="0"> |
| </p> |
| <p> |
| <a href="../concepts/cjavaviews.htm">Java views</a><br> |
| <a href="../concepts/concepts-7.htm">Java editor</a> |
| </p> |
| <p> |
| <img border="0" src="../images/ngrelt.png" alt="Related tasks"> |
| </p> |
| <p> |
| <a href="tasks-62.htm">Using the local history</a> |
| </p> |
| <p> |
| <img border="0" src="../images/ngrelr.png" alt="Related reference"> |
| </p> |
| <p> |
| <a href="../reference/ref-view-outline.htm">Java outline</a> |
| </p> |
| |
| </body> |
| </html> |
| |