| <!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"> |
| <meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]"> |
| <title> |
| Organizing existing import statements |
| </title> |
| <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| </head> |
| <body> |
| <h1> |
| Organizing existing import statements |
| </h1> |
| <p> |
| The Java editor can help you improve the existing import statements inside a compilation unit. |
| </p> |
| <ol> |
| <li> |
| Do one of the following while editing your Java code: |
| <ul> |
| <li> |
| Select <strong>Source > Organize Imports </strong> from the pop-up menu in the editor |
| </li> |
| <li> |
| Select <strong>Source > Organize Imports</strong> from the menu bar |
| </li> |
| <li> |
| Press <strong>Ctrl</strong>+<strong>Shift</strong>+<strong>O</strong> |
| </li> |
| </ul> |
| </li> |
| <li> |
| The Java editor generates a complete list of import statements, as specified by the import order preference, and new import statements replace the old ones. |
| </li> |
| </ol> |
| <p> |
| Note: <strong>Source > Organize Imports </strong> also works on whole packages or projects - just select them in the Package Explorer. |
| </p> |
| |
| <p> |
| <img src="../images/ngrelc.png" alt="Related concepts" border="0" > |
| </p> |
| <p> |
| <a href="../concepts/concepts-7.htm">Java editor</a> |
| </p> |
| <p> |
| <img src="../images/ngrelt.png" alt="Related tasks" border="0" > |
| </p> |
| <p> |
| <a href="tasks-59.htm">Adding required import statements</a><br> |
| <a href="tasks-58.htm">Managing import statements</a><br> |
| <a href="tasks-61.htm">Setting the order of import statements</a><br> |
| <a href="tasks-74.htm">Showing a type's compilation unit in the Package Explorer view</a> |
| </p> |
| <p> |
| <img src="../images/ngrelr.png" alt="Related reference" border="0" > |
| </p> |
| <p> |
| <a href="../reference/ref-menu-source.htm">Source menu</a> |
| </p> |
| |
| </body> |
| </html> |
| |