Using Quick Fix
To use the quick fix feature:
-
You need to have the Window > Preference > Java > Editor > Problem Indication
> Show problems before compiling checkbox selected.
-
In the Java editor, if you see an error underlined with a squiggly line,
position the caret inside the underlined range and do one of the following:
-
Press Ctrl+1 or
-
From the menu bar, select Edit > Quick Fix
-
A list of suggested corrections is presented, with a preview displayed
when an entry is selected.
-
Select an entry form the list and press Enter.
If you have the Window > Preference > Java > Editor > Problem Indication
> Indicate problems solvable with Quick Fix in vertical ruler checkbox
selected, then light bulb icons appear on the left-hand side vertical ruler to
indicate Quick Fix'able problems. You can then click on one of the the light bulb
icons to invoke Quick Fix.
Note: Occasionally, invoking Quick Fix will not suggest any
corrections. A message saying 'No suggestions available' will be
displayed in such cases.
Java editor
Using the Java editor
Quick Fix