| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
| <html> |
| <head> |
| <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> |
| Setting code formatting preferences |
| </title> |
| </head> |
| <body> |
| <h1> |
| Setting code formatting preferences |
| </h1> |
| <ol> |
| <li> |
| From the workbench menu bar, select <strong>Window</strong> > <strong>Preferences.</strong> The Workbench Preferences page opens. |
| </li> |
| <li> |
| In the left pane, expand the <strong>Java</strong> category and select <strong>Code Formatter</strong>. The Code Formatter Preferences page opens. |
| </li> |
| <li> |
| In the <strong>New Lines</strong>, <strong>Line Splitting,</strong> and <strong>Style</strong> tabs, select the code formatting |
| conventions that you want the formatter to follow. |
| </li> |
| <li> |
| Note that at the bottom of the page, you can observe an example effect of each individual code formatting option and see a preview of what your formatted code will look |
| like. |
| </li> |
| <li> |
| Click <strong>OK</strong> when you are done. |
| </li> |
| </ol> |
| <p> |
| <img width="159" height="27" src="../images/ngrelc.gif" alt="Related concepts" border="0"> |
| </p> |
| <p> |
| <a href="../concepts/concepts-1.htm">Java development tools (JDT)</a> |
| </p> |
| <p> |
| <img border="0" width="159" height="27" src="../images/ngrelt.gif" alt="Related tasks"> |
| </p> |
| <p> |
| <a href="tasks-66.htm">Formatting Java code</a><br> |
| <a href="tasks-67.htm">Formatting files or portions of code</a> |
| </p> |
| <p> |
| <img border="0" width="159" height="27" src="../images/ngrelr.gif" alt="Related reference"> |
| </p> |
| <p> |
| <a href="../reference/ref-17.htm">Code Formatter preferences</a> |
| </p> |
| <p> |
| <a href="../hglegal2003.htm"><img src="../images/ngibmcpy2003.gif" alt="Copyright (c) 2000, 2003 IBM Corporation and others. All Rights Reserved." border="0" width="324" height="14"></a> |
| </p> |
| </body> |
| </html> |
| |