Inferring type parameters for generic type references

Eclipse can attempt to infer type parameters for all generic type references in a class, package, or project. This is especially useful when migrating from Java 1.4 code to Java 5.0 code, allowing you to automatically make use of the generic classes in Java's collections API.

You will be given a dialog with two configurable options:

Press OK or Preview to continue with the operation.

Note: It may in some cases be impossible to assign consistent type parameters in a selection, or require deeper analysis than Eclipse can perform.

Related reference
Refactoring actions
Refactoring dialogs
Java preferences