Eclipse Quick Fix
# Eclipse Quick Fix
* * *
## Using Quick Fix
In the Eclipse editor, when you type letters, the editor performs an error analysis on your input.
The Java editor uses Java syntax to detect errors in the code. When it finds an error or warning:
* It highlights errors with a red wavy underline
* It highlights warnings with a yellow wavy underline
* It displays errors and warnings in the Problem view
* It displays a small yellow light bulb and warning/error markers on the vertical ruler
The Quick Fix dialog provides solutions. The Quick Fix dialog can be invoked by:
* Placing the mouse pointer on the wavy underline
* Clicking the light bulb
* Placing the mouse pointer on 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 the `Person` class does not have a method named `getId()`. Selecting "Create method 'getId()' in type 'Person'" from the pop-up fix suggestions will add the `getId()` method to the `Person` class.
You can also display the Quick Fix dialog by right-clicking an error item in the Problems view and then selecting the Quick Fix menu item, as shown in the image below:
!(#)
YouTip