| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <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.76 [en] (Windows NT 5.0; U) [Netscape]"> |
| <title> |
| Source actions |
| </title> |
| <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| </head> |
| <body> |
| <h1> |
| Source actions |
| </h1> |
| <p> |
| Source menu commands: |
| </p> |
| <table border="1" cellspacing="0"> |
| <tbody> |
| <tr> |
| <th> |
| <p> |
| Name |
| </p> |
| </th> |
| <th> |
| <p> |
| Function |
| </p> |
| </th> |
| <td> |
| <strong>Keyboard Shortcut</strong> |
| </td> |
| </tr> |
| <tr align="left" valign="top"> |
| <td align="left" valign="top"> |
| <p> |
| Comment |
| </p> |
| </td> |
| <td align="left" valign="top"> |
| <p> |
| Comments out all lines containing the current selection. |
| </p> |
| </td> |
| <td> |
| Ctrl + / |
| </td> |
| </tr> |
| <tr> |
| <td align="left" valign="top"> |
| <p> |
| Uncomment |
| </p> |
| </td> |
| <td align="left" valign="top"> |
| <p> |
| Uncomments all lines containing the current selection. |
| </p> |
| </td> |
| <td> |
| Ctrl + \ |
| </td> |
| </tr> |
| <tr> |
| <td align="left" valign="top"> |
| <p> |
| Shift Right |
| </p> |
| </td> |
| <td align="left" valign="top"> |
| <p> |
| Increments the level of indentation of the currently select lines. Only activated when the selection covers multiple lines or a single whole line. |
| </p> |
| </td> |
| <td> |
| Tab |
| </td> |
| </tr> |
| <tr> |
| <td align="left" valign="top"> |
| <p> |
| Shift Left |
| </p> |
| </td> |
| <td align="left" valign="top"> |
| <p> |
| Decrements the level of indentation of the currently select lines. Only activated when the selection covers multiple lines or a single whole line. |
| </p> |
| </td> |
| <td> |
| Shift + Tab |
| </td> |
| </tr> |
| <tr> |
| <td align="left" valign="top"> |
| <p> |
| Format |
| </p> |
| </td> |
| <td align="left" valign="top"> |
| <p> |
| Uses the code formatter to format the current text selection. The formatting options are configured on the <a href="ref-17.htm">Code Formatter preference page</a> |
| (Window > Preferences > Java > Code Formatter) |
| </p> |
| </td> |
| <td> |
| Ctrl + Shift + F |
| </td> |
| </tr> |
| <tr> |
| <td align="left" valign="top"> |
| <p> |
| Sort Members |
| </p> |
| </td> |
| <td align="left" valign="top"> |
| <p> |
| Sorts the members of a type according to the sorting order specified in |
| (Window > Preferences > Java > Appearance > Members Sort Order) |
| </p> |
| </td> |
| <td> |
| |
| </td> |
| </tr> |
| <tr> |
| <td> |
| Organize Imports |
| </td> |
| <td> |
| Organizes the import declarations in the compilation unit currently open or selected. Unnecessary import declarations are removed, and required import declarations are |
| ordered as specified in the <a href="ref-22.htm">Organize Import preference page</a> (Window > Preferences > Java > Organize Import). Organize import can be |
| executed on incomplete source and will prompt you when a referenced type name can not be mapped uniquely to a type in the current project.<br> |
| You can also organize multiple compilation units by invoking the action on a package or selecting a set of compilation units. |
| </td> |
| <td> |
| Ctrl + Shift + O |
| </td> |
| </tr> |
| <tr align="left" valign="top"> |
| <td> |
| Add Import |
| </td> |
| <td> |
| Creates an import declaration for a type reference currently selected. If the type reference if qualified, the qualification will be removed if possible. If the |
| referenced type name can not be mapped uniquely to a type of the current project you will be prompted to specify the correct type. Add Import tries to follow the |
| import order as specified in the <a href="ref-22.htm">Organize Import preference page</a> |
| </td> |
| <td> |
| Ctrl + Shift + M |
| </td> |
| </tr> |
| <tr align="left" valign="top"> |
| <td> |
| Override/Implement Methods |
| </td> |
| <td> |
| Opens the <a href="ref-dialog-override-method.htm">Override Method dialog</a> that allows you to override or implement a method in the current type. Available on types |
| or on a text selection inside a type. |
| </td> |
| <td> |
| |
| </td> |
| </tr> |
| <tr align="left" valign="top"> |
| <td> |
| Generate Getter and Setter |
| </td> |
| <td> |
| Opens the <a href="ref-dialog-gettersetter.htm">Generate Getter and Setter dialog</a> that allows you to create Getter and Setters for fields in the current type. |
| Available on fields and types or on a text selection inside a type. |
| </td> |
| <td> |
| |
| </td> |
| </tr> |
| <tr align="left" valign="top"> |
| <td> |
| Generate Delegate Methods |
| </td> |
| <td> |
| Opens the Generate Delegate Methods dialog that allows you to create method delegates for fields |
| in the current type. Available on fields. |
| </td> |
| <td> |
| |
| </td> |
| </tr> <tr> |
| <td> |
| Add Constructor from Superclass |
| </td> |
| <td> |
| For the currently selected type adds constructors as defined in the super class. Available on types or on a text selection inside a type. |
| </td> |
| <td> |
| |
| </td> |
| </tr> |
| <tr> |
| <td> |
| Surround with try/catch |
| </td> |
| <td> |
| For the selected statements all exception that have to be caught are evaluated. A try catch block is created around these expressions. You can use <em>Expand |
| Selection to</em> from the <a href="ref-menu-edit.htm">Edit</a> menu to get a valid selection range. |
| </td> |
| <td> |
| |
| </td> |
| </tr> |
| <tr> |
| <td> |
| Externalize Strings |
| </td> |
| <td> |
| Opens the Externalize strings wizard. This wizards allows you to replace all strings in the code by statements accessing a property file. |
| </td> |
| <td> |
| |
| </td> |
| </tr> |
| <tr align="left" valign="top"> |
| <td> |
| Find Strings to Externalize |
| </td> |
| <td> |
| Shows a dialog presenting a summary of number of strings not externalized. Available on projects, source folders and packages. |
| </td> |
| <td> |
| |
| </td> |
| </tr> |
| <tr align="left" valign="top"> |
| <td> |
| Convert Line Delimiters To |
| </td> |
| <td> |
| Changes all line delimiter in the currently open editor to use line delimiters as used in the following operating systems : |
| <ul> |
| <li> |
| CRLF (Windows) |
| </li> |
| <li> |
| LF (Unix, MacOS X) |
| <li> |
| CR (Classic MacOS) |
| </li> |
| </ul> |
| The Java editor is tolerant for a mixed usage of line delimiters. However, many other tools require an OS conform usage of line delimiters or at least line delimiter |
| consistency. |
| </td> |
| <td> |
| |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <p> |
| <img width="159" height="27" src="../images/ngrelc.gif" alt="Related concepts" border="0"><br> |
| <a href="../concepts/concepts-7.htm">Java editor</a><br> |
| <a href="../concepts/cnls.htm">String externalization</a><br> |
| <a href="../concepts/concepts-1.htm">Java development tools (JDT)</a> |
| <p> |
| <img border="0" width="159" height="27" src="../images/ngrelt.gif" alt="Related tasks"><br> |
| <a href="../tasks/tasks-54.htm">Using the Java editor</a><br> |
| <a href="../tasks/tasks-206.htm">Externalizing Strings</a> |
| </p> |
| <p> |
| <img border="0" width="159" height="27" src="../images/ngrelr.gif" alt="Related reference"><br> |
| <a href="ref-java-editor.htm">Java editor</a><br> |
| <a href="ref-21.htm">Java editor preferences</a><br> |
| <a href="ref-view-outline.htm">Outline view for Java</a><br> |
| <a href="ref-24.htm">Views and editors</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> |
| |