| <!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> |
| Using content/code assist |
| </title> |
| <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| </head> |
| <body> |
| <h1> |
| Using content/code assist |
| </h1> |
| <p> |
| You can use content assist (also called code assist) when writing Java code or Javadoc comments. |
| </p> |
| <ol> |
| <li> |
| Place your cursor in a valid position on a line of code in an editor and either |
| <ul> |
| <li> |
| Press <strong>Ctrl</strong>+<strong>Space</strong> |
| </li> |
| <li> |
| Select <strong>Edit</strong> > <strong>Content Assist</strong> from the menu bar |
| </li> |
| </ul> |
| If the Java editor finds valid candidates for this position, a list of possible completions is shown in a floating window. You can type further to narrow the list. You can |
| also hover over the selected list items to view its Javadoc information, if it is available. |
| </li> |
| <li> |
| Use the arrow keys or the mouse pointer to navigate through the possible completions. |
| </li> |
| <li> |
| Select an item in the list to complete the fragment by doing one of the following: |
| <ul> |
| <li> |
| Selecting it and pressing <strong>Enter</strong> |
| </li> |
| <li> |
| Double-clicking it |
| </li> |
| <li> |
| <em>Note: When a list item is selected, you can view any available Javadoc information for this item in hover help. Note that you must click an item to select it in |
| the list before you can view Javadoc hover help for it.</em> |
| </li> |
| </ul> |
| </li> |
| </ol> |
| <p> |
| <em>Note:</em> Completion proposals can be organized into different |
| categories. By default, content assist shows all of them but |
| pressing <strong>Ctrl+Space</strong> repeatedly |
| will cycle through the different categories. Open the |
| <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.CodeAssistPreferenceAdvanced)")'> |
| <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png"> |
| <strong>Content Assist</strong></a> preference page to configure content assist. |
| </p> |
| <p> |
| <img src="../images/ngrelc.png" alt="Related concepts" border="0" > |
| </p> |
| <p> |
| <a href="../concepts/concepts-7.htm">Java editor</a><br> |
| <a href="../concepts/concepts-11.htm">Scrapbook</a> |
| </p> |
| <p> |
| <img src="../images/ngrelt.png" alt="Related tasks" border="0" > |
| </p> |
| <p> |
| <a href="tasks-54.htm">Using the Java editor</a><br> |
| <a href="tasks-66.htm">Formatting Java code</a><br> |
| <a href="tasks-54.htm">Using the Java editor</a><br> |
| <a href="tasks-71.htm">Viewing Javadoc information</a><br> |
| <a href="../reference/views/ref-viewsandeditors.htm">Views and editors</a> |
| </p> |
| <p> |
| <img src="../images/ngrelr.png" alt="Related reference" border="0" ><br> |
| <a href="../reference/ref-143.htm">Java Content Assist</a> |
| </p> |
| |
| </body> |
| </html> |
| |