blob: 176a8b3fb2445bbd21cdbaf0d7f426fe19b727d9 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta name="copyright" content=
"Copyright (c) IBM Corporation and others 2000, 2011. 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=utf-8" />
<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" type="text/javascript">
</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 &gt;
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 &gt;
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/concept-java-views.htm">Java views</a><br />
<a href="../concepts/concept-java-editor.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/views/ref-view-outline.htm">Java outline</a>
</p>
</body>
</html>