Removing Unused Import Statements

In Step 3 of the Import Management Tool wizard, unused import statements are removed. In addition, if the source file contains fewer identifiers from an imported package than are specified by the Maximum Fully-Qualified Names in Source property, the import package statement is removed and the identifiers are changed to use fully qualified names.

Also in Step 3, package and single-name import statements are switched as appropriate, based on the value of the Number of Single Name Imports property.

If there are no import statements to be removed and no import statements to change from package to single-name or the reverse, Step 3 displays only a message and no actions are possible.

To override the Import Management tool's suggested actions:

  1. In the Imports tree view, click the Action for the package node you want to change, and choose Use Package Import or Use Single Name Import.
  2. Expand the package node or nodes to see if there are any single-name import statements scheduled for removal. If you don't want to remove the import, you can click the Action and select Use.
The java.lang package and the package of your processed class are omitted from the Imports tree view, as these packages are always included by default.
See also
Using the Import Management Tool
Configuring the Import Management Tool
Resolving Identifiers
Creating Import Statements
Adding an Import Statement With Fast Import

Legal Notices