Eclipse Quick Fix
Using Quick Fix
In the Eclipse editor, as you type, the editor performs error analysis on the content you enter.
The Java editor uses Java syntax to detect errors in the code. When it finds errors or warnings:
Highlights errors with red wavy lines
Highlights warnings with yellow wavy lines
Displays errors and warnings in the Problem view
Shows yellow light bulbs and error/warning indicators on the vertical ruler
The Quick Fix dialog provides solutions. The Quick Fix dialog can be invoked by:
Placing the mouse pointer over the wavy line
Clicking the light bulb
Placing the mouse pointer over the highlighted text and selecting the Quick Fix item from the Edit menu or pressing the shortcut key Ctrl + 1
In the image above, getId is highlighted because there is no getId() method in the Person class. Choose "Create method 'getId()' in type 'Person'" from the pop-up fix options to add the getId() method to the Person class.
You can also right-click on the error item in the Problems view and select the Quick Fix menu item to display the Quick Fix dialog, as shown below: