| <!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> |
| Extracting a method |
| </title> |
| <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| </head> |
| <body> |
| <h1> |
| Extracting a method |
| </h1> |
| <p> |
| To extract a method: |
| </p> |
| <ol> |
| <li> |
| In an editor, select a set of statements or an expression from a method body. |
| </li> |
| <li> |
| Do one of the following: |
| <ul> |
| <li> |
| From the pop-up menu in the editor, select <strong>Refactor</strong> > <strong>Extract Method</strong>. |
| </li> |
| <li> |
| From the menu bar, select <strong>Refactor</strong> > <strong>Extract Method</strong>. |
| </li> |
| </ul> |
| </li> |
| </ol> |
| <img src="../images/ngrelc.png" alt="Related concepts" border="0" > |
| <p> |
| <a href="../concepts/concepts-1.htm">Java development tools (JDT)</a> |
| </p> |
| <p> |
| <img src="../images/ngrelt.png" alt="Related tasks" border="0" > |
| </p> |
| <p> |
| <a href="tasks-96.htm">Renaming a method</a> |
| </p> |
| <p> |
| <img src="../images/ngrelr.png" alt="Related reference" border="0" ><a href="../reference/ref-154.htm"></a> |
| </p> |
| <p> |
| <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-13.htm">Java preferences</a><br> |
| <a href="../reference/ref-154.htm">Extract method errors</a> |
| </p> |
| |
| </body> |
| </html> |
| |