Completing a Java Expression

  1. In the Java Editor, type the first few characters of the expression, such as import javax.

  2. Press Ctrl-spacebar, or pause after typing a period.

    The code completion box is displayed, providing a scrolling list of possible classes, methods, variables, and so on that can complete your expression.

  3. Use the most convenient combination of the following options:

    If you press Enter for a method with parameters, replaceable text is given for the first parameter, which you can then edit. If the method takes multiple parameters, you can reopen the list by typing a comma after you fill in the parameter.

    If the IDE recognizes the type of parameter required, its type is shown in the header of the code completion box. If not, a question mark (?) is displayed.

    If you enter a parameter that does not match any of the recognized parameter combinations for the method name, all the recognized methods and their parameter lists are displayed and an asterisk (*) appears in the header of the code completion box.
By default, the elements displayed in the code completion box are defined by the Java 2 SDK, v. 1.3. You can add your own classes to the code completion choices by updating the IDE's parser database.
See also
Updating the Parser Database

Setting the Completion Box Delay

Disabling Automatic Completion



Completing an HTML Tag

Legal Notices