Adding a Java Import Statement With Fast Import

See Also

The Fast Import feature enables you to quickly add import statements for Java classes in your file.

To add an import statement:

  1. Move the insertion point to the name of a class in your Java source file.
  2. Press Alt-Shift-I.

    If the class is found in the code completion database, the Import Class dialog box is displayed. This contains a list of classes that match the class at the insertion point.

    For example, if the class name is List, the dialog box displays java.awt.List, java.util.List, and any other class that you have defined with the name List.

  3. Select the class that you want to import.
  4. Select the radio button that corresponds to the way that you want the class to be imported. You can choose between importing the class, importing the package, or having the fully qualified name generated in the code.
  5. Click Import. The IDE generates the import statement in your Java source file.
Note Fast Import uses the code completion database to generate the list of possible classes to import. If you are unable to add an import statement for a class that you created, update the code completion database to include that class.
See Also
Code Completion Database
Editing Java Code
Using the Import Management Tool

Legal Notices